Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/go/ssa: TestStdlib failures #60263

Open
gopherbot opened this issue May 17, 2023 · 7 comments
Open

x/tools/go/ssa: TestStdlib failures #60263

gopherbot opened this issue May 17, 2023 · 7 comments
Assignees
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link

#!watchflakes
post <- pkg == "golang.org/x/tools/go/ssa" && test == "TestStdlib"

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestStdlib (99.70s)
    stdlib_test.go:94: $GOROOT/src/cmd/compile/internal/base/print.go:202:1: duplicate function named cmd/compile/internal/base.Fatalf
    stdlib_test.go:96: /workdir/go/src/cmd/compile/internal/base/print.go:202:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/log/log.go:359:1: duplicate function named log.Flags
    stdlib_test.go:96: /workdir/go/src/log/log.go:359:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/format.go:527:1: duplicate function named (time.Time).String
    stdlib_test.go:96: /workdir/go/src/time/format.go:527:15:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/fmt/scan.go:80:6: duplicate function named fmt.Scanf
    stdlib_test.go:96: $GOROOT/src/fmt/scan.go:80:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:762:1: duplicate function named (time.Duration).Microseconds
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1310375
    stdlib_test.go:122: Load/parse/typecheck:  1m32.544931304s
    stdlib_test.go:123: SSA create:            324.289156ms
    stdlib_test.go:124: SSA build:             3.328902648s
    stdlib_test.go:127: #Packages:             719
    stdlib_test.go:128: #Functions:            45119
    stdlib_test.go:129: #Instructions:         4376894
    stdlib_test.go:130: #MB AST+types:         535
    stdlib_test.go:131: #MB SSA:               92

watchflakes

@gopherbot gopherbot added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository. labels May 17, 2023
@gopherbot gopherbot added this to the Unreleased milestone May 17, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/go/ssa" && test == "TestStdlib"
2023-05-16 19:01 linux-386-longtest tools@522243a7 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (99.70s)
    stdlib_test.go:94: $GOROOT/src/cmd/compile/internal/base/print.go:202:1: duplicate function named cmd/compile/internal/base.Fatalf
    stdlib_test.go:96: /workdir/go/src/cmd/compile/internal/base/print.go:202:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/log/log.go:359:1: duplicate function named log.Flags
    stdlib_test.go:96: /workdir/go/src/log/log.go:359:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/format.go:527:1: duplicate function named (time.Time).String
    stdlib_test.go:96: /workdir/go/src/time/format.go:527:15:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/fmt/scan.go:80:6: duplicate function named fmt.Scanf
    stdlib_test.go:96: $GOROOT/src/fmt/scan.go:80:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:762:1: duplicate function named (time.Duration).Microseconds
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1310375
    stdlib_test.go:122: Load/parse/typecheck:  1m32.544931304s
    stdlib_test.go:123: SSA create:            324.289156ms
    stdlib_test.go:124: SSA build:             3.328902648s
    stdlib_test.go:127: #Packages:             719
    stdlib_test.go:128: #Functions:            45119
    stdlib_test.go:129: #Instructions:         4376894
    stdlib_test.go:130: #MB AST+types:         535
    stdlib_test.go:131: #MB SSA:               92
2023-05-16 19:01 linux-amd64-longtest tools@522243a7 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (91.08s)
    stdlib_test.go:94: /workdir/go/src/time/time.go:1173:15: duplicate function named (time.Time).ZoneBounds
    stdlib_test.go:96: $GOROOT/src/time/time.go:1173:1:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/cmd/compile/internal/ssa/deadcode.go:22:6: duplicate function named cmd/compile/internal/ssa.ReachableBlocks
    stdlib_test.go:96: $GOROOT/src/cmd/compile/internal/ssa/deadcode.go:22:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/cmd/compile/internal/types/type.go:1901:1: duplicate function named cmd/compile/internal/types.FloatForComplex
    stdlib_test.go:96: /workdir/go/src/cmd/compile/internal/types/type.go:1901:6:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/time/time.go:504:15: duplicate function named (*time.Time).Date
    stdlib_test.go:96: $GOROOT/src/time/time.go:504:1:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/internal/race/norace.go:16:6: duplicate function named internal/race.Acquire
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1311450
    stdlib_test.go:122: Load/parse/typecheck:  1m24.581297325s
    stdlib_test.go:123: SSA create:            426.516528ms
    stdlib_test.go:124: SSA build:             3.487006483s
    stdlib_test.go:127: #Packages:             721
    stdlib_test.go:128: #Functions:            45186
    stdlib_test.go:129: #Instructions:         4379513
    stdlib_test.go:130: #MB AST+types:         990
    stdlib_test.go:131: #MB SSA:               191
2023-05-16 19:01 linux-amd64-longtest-race tools@522243a7 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (158.85s)
    stdlib_test.go:94: $GOROOT/src/time/time.go:587:1: duplicate function named (*time.Time).Minute
    stdlib_test.go:96: /workdir/go/src/time/time.go:587:15:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/fmt/print.go:247:6: duplicate function named fmt.Appendf
    stdlib_test.go:96: $GOROOT/src/fmt/print.go:247:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/os/exec.go:78:1: duplicate function named os.Getpid
    stdlib_test.go:96: /workdir/go/src/os/exec.go:78:6:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/os/file_unix.go:384:6: duplicate function named os.Symlink
    stdlib_test.go:96: $GOROOT/src/os/file_unix.go:384:1:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/time/time.go:1144:15: duplicate function named (time.Time).In
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1311450
    stdlib_test.go:122: Load/parse/typecheck:  2m14.455156188s
    stdlib_test.go:123: SSA create:            1.575096209s
    stdlib_test.go:124: SSA build:             20.078206585s
    stdlib_test.go:127: #Packages:             721
    stdlib_test.go:128: #Functions:            45186
    stdlib_test.go:129: #Instructions:         4379513
    stdlib_test.go:130: #MB AST+types:         1009
    stdlib_test.go:131: #MB SSA:               190
2023-05-16 19:01 linux-arm64-longtest tools@522243a7 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (57.15s)
    stdlib_test.go:94: $GOROOT/src/log/log.go:370:1: duplicate function named log.Prefix
    stdlib_test.go:96: /tmp/workdir/go/src/log/log.go:370:6:   (previously defined here)
    stdlib_test.go:94: /tmp/workdir/go/src/time/time.go:884:15: duplicate function named (*time.Time).Sub
    stdlib_test.go:96: $GOROOT/src/time/time.go:884:1:   (previously defined here)
    stdlib_test.go:94: /tmp/workdir/go/src/time/time.go:791:19: duplicate function named (time.Duration).Hours
    stdlib_test.go:96: $GOROOT/src/time/time.go:791:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/cmd/compile/internal/base/print.go:114:1: duplicate function named cmd/compile/internal/base.Errorf
    stdlib_test.go:96: /tmp/workdir/go/src/cmd/compile/internal/base/print.go:114:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:1163:1: duplicate function named (*time.Time).Zone
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1311159
    stdlib_test.go:122: Load/parse/typecheck:  53.993446632s
    stdlib_test.go:123: SSA create:            249.508097ms
    stdlib_test.go:124: SSA build:             2.271343195s
    stdlib_test.go:127: #Packages:             719
    stdlib_test.go:128: #Functions:            45179
    stdlib_test.go:129: #Instructions:         4378582
    stdlib_test.go:130: #MB AST+types:         990
    stdlib_test.go:131: #MB SSA:               190
2023-05-16 19:01 windows-amd64-longtest tools@522243a7 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (79.67s)
    stdlib_test.go:94: C:\workdir\go\src\time\time.go:260:15: duplicate function named (*time.Time).Before
    stdlib_test.go:96: $GOROOT/src/time/time.go:260:1:   (previously defined here)
    stdlib_test.go:94: C:\workdir\go\src\os\file_posix.go:149:16: duplicate function named (*os.File).Truncate
    stdlib_test.go:96: $GOROOT/src/os/file_posix.go:149:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:1278:1: duplicate function named (*time.Time).UnmarshalBinary
    stdlib_test.go:96: C:\workdir\go\src\time\time.go:1278:16:   (previously defined here)
    stdlib_test.go:94: C:\workdir\go\src\internal\poll\fd_poll_runtime.go:132:15: duplicate function named (*internal/poll.FD).SetDeadline
    stdlib_test.go:96: $GOROOT/src/internal/poll/fd_poll_runtime.go:132:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:1343:1: duplicate function named (*time.Time).MarshalJSON
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1313151
    stdlib_test.go:122: Load/parse/typecheck:  1m15.9335798s
    stdlib_test.go:123: SSA create:            233.4036ms
    stdlib_test.go:124: SSA build:             2.8672027s
    stdlib_test.go:127: #Packages:             723
    stdlib_test.go:128: #Functions:            45267
    stdlib_test.go:129: #Instructions:         4395041
    stdlib_test.go:130: #MB AST+types:         1003
    stdlib_test.go:131: #MB SSA:               195

watchflakes

@bcmills
Copy link
Contributor

bcmills commented May 17, 2023

Appears to have been fixed by https://go.dev/cl/495475 (CC @cherrymui @prattmic).

@bcmills bcmills closed this as completed May 17, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/go/ssa" && test == "TestStdlib"
2023-05-16 20:18 darwin-amd64-longtest tools@743372f5 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (266.39s)
    stdlib_test.go:94: $GOROOT/src/time/time.go:504:1: duplicate function named (*time.Time).Date
    stdlib_test.go:96: /tmp/buildlet/go/src/time/time.go:504:15:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/cmd/compile/internal/riscv64/galign.go:12:1: duplicate function named cmd/compile/internal/riscv64.Init
    stdlib_test.go:96: /tmp/buildlet/go/src/cmd/compile/internal/riscv64/galign.go:12:6:   (previously defined here)
    stdlib_test.go:94: /tmp/buildlet/go/src/time/time.go:295:15: duplicate function named (time.Time).Equal
    stdlib_test.go:96: $GOROOT/src/time/time.go:295:1:   (previously defined here)
    stdlib_test.go:94: /tmp/buildlet/go/src/os/file.go:179:16: duplicate function named (*os.File).Write
    stdlib_test.go:96: $GOROOT/src/os/file.go:179:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/syscall/zsyscall_darwin_amd64.go:859:1: duplicate function named syscall.Getuid
...
    stdlib_test.go:120: GOMAXPROCS:            6
    stdlib_test.go:121: #Source lines:         1299688
    stdlib_test.go:122: Load/parse/typecheck:  4m0.14765622s
    stdlib_test.go:123: SSA create:            5.352532527s
    stdlib_test.go:124: SSA build:             17.614673684s
    stdlib_test.go:127: #Packages:             725
    stdlib_test.go:128: #Functions:            45207
    stdlib_test.go:129: #Instructions:         4370721
    stdlib_test.go:130: #MB AST+types:         977
    stdlib_test.go:131: #MB SSA:               201
2023-05-16 20:18 linux-386-longtest tools@743372f5 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (77.91s)
    stdlib_test.go:94: /workdir/go/src/log/log.go:423:6: duplicate function named log.Fatalln
    stdlib_test.go:96: $GOROOT/src/log/log.go:423:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:1210:1: duplicate function named (time.Time).UnixMicro
    stdlib_test.go:96: /workdir/go/src/time/time.go:1210:15:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/cmd/compile/internal/base/print.go:286:1: duplicate function named cmd/compile/internal/base.ExitIfErrors
    stdlib_test.go:96: /workdir/go/src/cmd/compile/internal/base/print.go:286:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/os/file_posix.go:19:1: duplicate function named (*os.File).Close
    stdlib_test.go:96: /workdir/go/src/os/file_posix.go:19:16:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/log/log.go:404:6: duplicate function named log.Println
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1310375
    stdlib_test.go:122: Load/parse/typecheck:  1m11.111675799s
    stdlib_test.go:123: SSA create:            656.329729ms
    stdlib_test.go:124: SSA build:             3.119392439s
    stdlib_test.go:127: #Packages:             719
    stdlib_test.go:128: #Functions:            45119
    stdlib_test.go:129: #Instructions:         4376894
    stdlib_test.go:130: #MB AST+types:         535
    stdlib_test.go:131: #MB SSA:               92
2023-05-16 20:18 linux-amd64-longtest tools@743372f5 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (107.21s)
    stdlib_test.go:94: /workdir/go/src/time/time.go:777:19: duplicate function named (*time.Duration).Seconds
    stdlib_test.go:96: $GOROOT/src/time/time.go:777:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/internal/poll/fd_unix.go:699:1: duplicate function named (*internal/poll.FD).RawRead
    stdlib_test.go:96: /workdir/go/src/internal/poll/fd_unix.go:699:15:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:516:1: duplicate function named (*time.Time).Month
    stdlib_test.go:96: /workdir/go/src/time/time.go:516:15:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/os/file.go:620:6: duplicate function named os.DirFS
    stdlib_test.go:96: $GOROOT/src/os/file.go:620:1:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/runtime/mfinal.go:511:6: duplicate function named runtime.KeepAlive
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1311450
    stdlib_test.go:122: Load/parse/typecheck:  1m41.552658612s
    stdlib_test.go:123: SSA create:            416.413677ms
    stdlib_test.go:124: SSA build:             4.263075838s
    stdlib_test.go:127: #Packages:             721
    stdlib_test.go:128: #Functions:            45186
    stdlib_test.go:129: #Instructions:         4379513
    stdlib_test.go:130: #MB AST+types:         990
    stdlib_test.go:131: #MB SSA:               191
2023-05-16 20:18 linux-amd64-longtest-race tools@743372f5 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (166.43s)
    stdlib_test.go:94: /workdir/go/src/os/dir.go:37:16: duplicate function named (*os.File).Readdir
    stdlib_test.go:96: $GOROOT/src/os/dir.go:37:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/format.go:620:1: duplicate function named (time.Time).Format
    stdlib_test.go:96: /workdir/go/src/time/format.go:620:15:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/log/log.go:404:1: duplicate function named log.Println
    stdlib_test.go:96: /workdir/go/src/log/log.go:404:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/os/env.go:119:1: duplicate function named os.Setenv
    stdlib_test.go:96: /workdir/go/src/os/env.go:119:6:   (previously defined here)
    stdlib_test.go:94: /workdir/go/src/time/time.go:1134:15: duplicate function named (time.Time).Local
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1311450
    stdlib_test.go:122: Load/parse/typecheck:  2m20.405658362s
    stdlib_test.go:123: SSA create:            1.125816621s
    stdlib_test.go:124: SSA build:             19.778225383s
    stdlib_test.go:127: #Packages:             721
    stdlib_test.go:128: #Functions:            45186
    stdlib_test.go:129: #Instructions:         4379513
    stdlib_test.go:130: #MB AST+types:         1009
    stdlib_test.go:131: #MB SSA:               190
2023-05-16 20:18 linux-arm64-longtest tools@743372f5 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (57.45s)
    stdlib_test.go:94: $GOROOT/src/time/time.go:1134:1: duplicate function named (time.Time).Local
    stdlib_test.go:96: /tmp/workdir/go/src/time/time.go:1134:15:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/time/time.go:856:1: duplicate function named (time.Time).Add
    stdlib_test.go:96: /tmp/workdir/go/src/time/time.go:856:15:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/os/file_unix.go:311:1: duplicate function named os.Truncate
    stdlib_test.go:96: /tmp/workdir/go/src/os/file_unix.go:311:6:   (previously defined here)
    stdlib_test.go:94: /tmp/workdir/go/src/sync/atomic/doc.go:153:6: duplicate function named sync/atomic.LoadUint32
    stdlib_test.go:96: $GOROOT/src/sync/atomic/doc.go:153:1:   (previously defined here)
    stdlib_test.go:94: /tmp/workdir/go/src/time/time.go:604:15: duplicate function named (*time.Time).YearDay
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1311159
    stdlib_test.go:122: Load/parse/typecheck:  54.258037611s
    stdlib_test.go:123: SSA create:            279.056158ms
    stdlib_test.go:124: SSA build:             2.289397195s
    stdlib_test.go:127: #Packages:             719
    stdlib_test.go:128: #Functions:            45179
    stdlib_test.go:129: #Instructions:         4378582
    stdlib_test.go:130: #MB AST+types:         990
    stdlib_test.go:131: #MB SSA:               190
2023-05-16 20:18 windows-amd64-longtest tools@743372f5 go@ad6dcf9d x/tools/go/ssa.TestStdlib (log)
--- FAIL: TestStdlib (76.57s)
    stdlib_test.go:94: $GOROOT/src/internal/poll/fd_windows.go:816:1: duplicate function named (*internal/poll.FD).WriteTo
    stdlib_test.go:96: C:\workdir\go\src\internal\poll\fd_windows.go:816:15:   (previously defined here)
    stdlib_test.go:94: C:\workdir\go\src\time\time.go:295:15: duplicate function named (time.Time).Equal
    stdlib_test.go:96: $GOROOT/src/time/time.go:295:1:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/os/env.go:119:1: duplicate function named os.Setenv
    stdlib_test.go:96: C:\workdir\go\src\os\env.go:119:6:   (previously defined here)
    stdlib_test.go:94: $GOROOT/src/internal/poll/fd_windows.go:127:1: duplicate function named (*internal/poll.operation).InitMsg
    stdlib_test.go:96: C:\workdir\go\src\internal\poll\fd_windows.go:127:21:   (previously defined here)
    stdlib_test.go:94: C:\workdir\go\src\cmd\compile\internal\base\print.go:78:6: duplicate function named cmd/compile/internal/base.FlushErrors
...
    stdlib_test.go:120: GOMAXPROCS:            16
    stdlib_test.go:121: #Source lines:         1313151
    stdlib_test.go:122: Load/parse/typecheck:  1m13.2618049s
    stdlib_test.go:123: SSA create:            225.6021ms
    stdlib_test.go:124: SSA build:             2.4247919s
    stdlib_test.go:127: #Packages:             723
    stdlib_test.go:128: #Functions:            45267
    stdlib_test.go:129: #Instructions:         4395041
    stdlib_test.go:130: #MB AST+types:         1003
    stdlib_test.go:131: #MB SSA:               195

watchflakes

@prattmic
Copy link
Member

We decided that this is an unrobust test. go list can return the same package in multiple configurations (in this case a default config, and one with PGO for cmd/compile). The test should take that into consideration when looking for duplicate symbols.

@adonovan you mentioned you were looking into fixing the test. Is that still the case or should I take a look?

@prattmic prattmic reopened this May 19, 2023
@gopherbot
Copy link
Author

Change https://go.dev/cl/496575 mentions this issue: go/ssa: TestStdlib: disable check that function names are distinct

@gopherbot
Copy link
Author

Change https://go.dev/cl/497455 mentions this issue: cmd/compile: build compiler with PGO

gopherbot pushed a commit that referenced this issue May 23, 2023
Reapples CL 495596, which was reverted at CL 496185. The x/tools
failure, #60263, has been resolved. The ppc64 failures, #60368, have
_not_ been resolved, but are believed to be specific to that port. This
CL will make ppc64 flaky while the issue is investigated, but give more
soak time on primary ports.

Build the compiler with PGO. As go build -pgo=auto is enabled by
default, we just need to store a profile in the compiler's
directory.

The profile is collected from building all std and cmd packages on
Linux/AMD64 machine, using profile.sh.

This improves the compiler speed. On Linux/AMD64,
name        old time/op       new time/op       delta
Template          138ms ± 5%        136ms ± 4%  -1.44%  (p=0.005 n=36+39)
Unicode           147ms ± 4%        140ms ± 4%  -4.99%  (p=0.000 n=40+39)
GoTypes           780ms ± 3%        778ms ± 4%    ~     (p=0.172 n=39+39)
Compiler          105ms ± 5%         99ms ± 7%  -5.64%  (p=0.000 n=40+40)
SSA               5.83s ± 6%        5.80s ± 6%    ~     (p=0.556 n=40+40)
Flate            89.0ms ± 5%       87.0ms ± 6%  -2.18%  (p=0.000 n=40+40)
GoParser          172ms ± 4%        167ms ± 4%  -2.72%  (p=0.000 n=39+40)
Reflect           333ms ± 4%        333ms ± 3%    ~     (p=0.426 n=40+39)
Tar               128ms ± 4%        126ms ± 4%  -1.82%  (p=0.000 n=39+39)
XML               173ms ± 4%        170ms ± 4%  -1.39%  (p=0.000 n=39+40)
[Geo mean]        253ms             248ms       -2.13%

The profile is pretty transferable. Using the same profile, we
see a bigger win on Darwin/ARM64,
name        old time/op       new time/op       delta
Template         71.0ms ± 2%       68.3ms ± 2%  -3.90%  (p=0.000 n=20+20)
Unicode          71.8ms ± 2%       66.8ms ± 2%  -6.90%  (p=0.000 n=20+20)
GoTypes           444ms ± 1%        428ms ± 1%  -3.53%  (p=0.000 n=19+20)
Compiler         48.9ms ± 3%       45.6ms ± 3%  -6.81%  (p=0.000 n=20+20)
SSA               3.25s ± 2%        3.09s ± 1%  -5.03%  (p=0.000 n=19+20)
Flate            44.0ms ± 2%       42.3ms ± 2%  -3.72%  (p=0.000 n=19+20)
GoParser         76.7ms ± 1%       73.5ms ± 1%  -4.15%  (p=0.000 n=18+19)
Reflect           172ms ± 1%        165ms ± 1%  -4.13%  (p=0.000 n=20+19)
Tar              63.1ms ± 1%       60.4ms ± 2%  -4.24%  (p=0.000 n=19+20)
XML              83.2ms ± 2%       79.2ms ± 2%  -4.79%  (p=0.000 n=20+20)
[Geo mean]        127ms             121ms       -4.73%

For #60368.

Change-Id: I2cec0fc85e21c38d57ba6f0e5e90cde5d443ebd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/497455
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/go/ssa" && test == "TestStdlib"
2024-02-16 15:54 x_tools-gotip-darwin-amd64-longtest tools@0d171942 go@86a32d6d x/tools/go/ssa.TestStdlib [ABORT] (log)
=== RUN   TestStdlib
panic: test timed out after 10m0s
running tests:
	TestStdlib (9m39s)

goroutine 11074 [running]:
testing.(*M).startAlarm.func1()
	/Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:2366 +0x385
created by time.goFunc
	/Users/swarming/.swarming/w/ir/x/w/goroot/src/time/sleep.go:177 +0x2d
...
sync.(*Once).doSlow(0xc01b44cc10?, 0xc01b1b9f68?)
	/Users/swarming/.swarming/w/ir/x/w/goroot/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/Users/swarming/.swarming/w/ir/x/w/goroot/src/sync/once.go:65
golang.org/x/tools/go/ssa.(*Package).Build(...)
	/Users/swarming/.swarming/w/ir/x/w/targetrepo2994972967/go/ssa/builder.go:2639
golang.org/x/tools/go/ssa.(*Program).Build.func1(0xa446a20?)
	/Users/swarming/.swarming/w/ir/x/w/targetrepo2994972967/go/ssa/builder.go:2622 +0x15
created by golang.org/x/tools/go/ssa.(*Program).Build in goroutine 2297
	/Users/swarming/.swarming/w/ir/x/w/targetrepo2994972967/go/ssa/builder.go:2621 +0x18a

watchflakes

@gopherbot gopherbot reopened this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Done
Development

No branches or pull requests

4 participants