diff options
| author | Michael Pratt <mpratt@google.com> | 2024-01-22 22:35:04 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-01-22 23:07:48 +0000 |
| commit | a807295d438f9575c32a5d4fa0bbaf6b8827f344 (patch) | |
| tree | f6165e24558760960a9f051985d384b6dd2acf07 /src/cmd/compile/internal/test | |
| parent | c46966653f6144e20f8b9bccb96e7a7f1d32aeb9 (diff) | |
| download | go-a807295d438f9575c32a5d4fa0bbaf6b8827f344.tar.xz | |
Revert "cmd/preprofile: Add preprocess tool to pre-parse the profile file."
This reverts CL 529738.
Reason for revert: Breaking longtest builders
For #58102.
Fixes #65220.
Change-Id: Id295e3249da9d82f6a9e4fc571760302a1362def
Reviewed-on: https://go-review.googlesource.com/c/go/+/557460
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/compile/internal/test')
| -rw-r--r-- | src/cmd/compile/internal/test/pgo_inl_test.go | 35 | ||||
| -rw-r--r-- | src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof.node_map | 13 |
2 files changed, 2 insertions, 46 deletions
diff --git a/src/cmd/compile/internal/test/pgo_inl_test.go b/src/cmd/compile/internal/test/pgo_inl_test.go index 3aafaee197..da6c4a53d3 100644 --- a/src/cmd/compile/internal/test/pgo_inl_test.go +++ b/src/cmd/compile/internal/test/pgo_inl_test.go @@ -43,12 +43,7 @@ go 1.19 } // testPGOIntendedInlining tests that specific functions are inlined. -func testPGOIntendedInlining(t *testing.T, dir string, preprocessed ...bool) { - defaultPGOPackValue := false - if len(preprocessed) > 0 { - defaultPGOPackValue = preprocessed[0] - } - +func testPGOIntendedInlining(t *testing.T, dir string) { testenv.MustHaveGoRun(t) t.Parallel() @@ -91,12 +86,7 @@ func testPGOIntendedInlining(t *testing.T, dir string, preprocessed ...bool) { // Build the test with the profile. Use a smaller threshold to test. // TODO: maybe adjust the test to work with default threshold. - var pprof string - if defaultPGOPackValue == false { - pprof = filepath.Join(dir, "inline_hot.pprof") - } else { - pprof = filepath.Join(dir, "inline_hot.pprof.node_map") - } + pprof := filepath.Join(dir, "inline_hot.pprof") gcflag := fmt.Sprintf("-m -m -pgoprofile=%s -d=pgoinlinebudget=160,pgoinlinecdfthreshold=90", pprof) out := buildPGOInliningTest(t, dir, gcflag) @@ -175,27 +165,6 @@ func TestPGOIntendedInlining(t *testing.T) { } // TestPGOIntendedInlining tests that specific functions are inlined when PGO -// is applied to the exact source that was profiled. -func TestPGOPreprocessInlining(t *testing.T) { - wd, err := os.Getwd() - if err != nil { - t.Fatalf("error getting wd: %v", err) - } - srcDir := filepath.Join(wd, "testdata/pgo/inline") - - // Copy the module to a scratch location so we can add a go.mod. - dir := t.TempDir() - - for _, file := range []string{"inline_hot.go", "inline_hot_test.go", "inline_hot.pprof.node_map"} { - if err := copyFile(filepath.Join(dir, file), filepath.Join(srcDir, file)); err != nil { - t.Fatalf("error copying %s: %v", file, err) - } - } - - testPGOIntendedInlining(t, dir, true) -} - -// TestPGOIntendedInlining tests that specific functions are inlined when PGO // is applied to the modified source. func TestPGOIntendedInliningShiftedLines(t *testing.T) { wd, err := os.Getwd() diff --git a/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof.node_map b/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof.node_map deleted file mode 100644 index bc5bc66b61..0000000000 --- a/src/cmd/compile/internal/test/testdata/pgo/inline/inline_hot.pprof.node_map +++ /dev/null @@ -1,13 +0,0 @@ -GO PREPROFILE V1 -example.com/pgo/inline.benchmarkB -example.com/pgo/inline.A -18 17 0 1 1 -example.com/pgo/inline.(*BS).NS -example.com/pgo/inline.T -13 53 124 129 2 -example.com/pgo/inline.(*BS).NS -example.com/pgo/inline.T -8 53 124 129 3 -example.com/pgo/inline.A -example.com/pgo/inline.(*BS).NS -7 74 1 130 129 |
