]> Cypherpunks repositories - gostls13.git/commit
cmd/link: add -randlayout flag to randomize function ordering
authorCherry Mui <cherryyz@google.com>
Tue, 6 Feb 2024 23:08:34 +0000 (18:08 -0500)
committerCherry Mui <cherryyz@google.com>
Fri, 16 Feb 2024 14:59:05 +0000 (14:59 +0000)
commit5258d4ed60ffe272fe51d7793c4ca6f8cc054299
tree4ff71b46818a27c35cf983a16c45f1dbc5188ea7
parent284e553035137fc339617f01dd53766977cd3e8c
cmd/link: add -randlayout flag to randomize function ordering

Sometimes we found that benchmark results may strongly depend on
the ordering of functions laid out in the binary. This CL adds a
flag -randlayout=seed, which randomizes the function layout (in a
deterministic way), so can verify the benchmark results against
different function ordering.

Change-Id: I85f33881bbfd4ca6812fbd4bec00bf475755a09e
Reviewed-on: https://go-review.googlesource.com/c/go/+/562157
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/main.go
src/cmd/link/internal/ld/pcln.go
src/cmd/link/link_test.go