From: Josh Bleecher Snyder Date: Mon, 4 Oct 2021 22:51:22 +0000 (-0700) Subject: cmd/compile: make stkobj symbols content-addressable X-Git-Tag: go1.18beta1~1046 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c1a0aa300a1003ab823d5633e521e064a063271c;p=gostls13.git cmd/compile: make stkobj symbols content-addressable Shrinks binaries a little bit. size before after Δ % api 4892370 4875858 -16512 -0.338% asm 4711218 4694706 -16512 -0.350% cgo 4164770 4148258 -16512 -0.396% compile 21875922 21826386 -49536 -0.226% cover 4358370 4341858 -16512 -0.379% doc 3532562 3516050 -16512 -0.467% link 6110786 6094274 -16512 -0.270% objdump 3982914 3966402 -16512 -0.415% pprof 12869986 12836962 -33024 -0.257% trace 9614626 9598114 -16512 -0.172% vet 6580322 6563810 -16512 -0.251% total 102897284 102666116 -231168 -0.225% Change-Id: Idf4ba3c05e35ec1d1ae957d6ded00ae79cc0fd2a Reviewed-on: https://go-review.googlesource.com/c/go/+/172198 Trust: Josh Bleecher Snyder Run-TryBot: Josh Bleecher Snyder TryBot-Result: Go Bot Reviewed-by: Cherry Mui --- diff --git a/src/cmd/compile/internal/liveness/plive.go b/src/cmd/compile/internal/liveness/plive.go index e358155a34..56580d11b5 100644 --- a/src/cmd/compile/internal/liveness/plive.go +++ b/src/cmd/compile/internal/liveness/plive.go @@ -1417,6 +1417,7 @@ func (lv *liveness) emitStackObjects() *obj.LSym { // Populate the stack object data. // Format must match runtime/stack.go:stackObjectRecord. x := base.Ctxt.Lookup(lv.fn.LSym.Name + ".stkobj") + x.Set(obj.AttrContentAddressable, true) lv.fn.LSym.Func().StackObjects = x off := 0 off = objw.Uintptr(x, off, uint64(len(vars)))