mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj: use string instead of LSym in Pcln
In a concurrent backend, Ctxt.Lookup will need some form of concurrency protection, which will make it more expensive. This CL changes the pcln table builder to track filenames as strings rather than LSyms. Those strings are then converted into LSyms at the last moment, for writing the object file. This CL removes over 85% of the calls to Ctxt.Lookup in a run of make.bash. Passes toolstash-check. Updates #15756 Change-Id: I3c53deff6f16f2643169f3bdfcc7aca2ca58b0a4 Reviewed-on: https://go-review.googlesource.com/39291 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
719c7b03ba
commit
26308fb481
5 changed files with 13 additions and 14 deletions
|
|
@ -401,8 +401,8 @@ type Pcln struct {
|
|||
Pcdata []Pcdata
|
||||
Funcdata []*LSym
|
||||
Funcdataoff []int64
|
||||
File []*LSym
|
||||
Lastfile *LSym
|
||||
File []string
|
||||
Lastfile string
|
||||
Lastindex int
|
||||
InlTree InlTree // per-function inlining tree extracted from the global tree
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue