mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: drop stack-allocated pcvalueCaches
Now that pcvalue keeps its cache on the M, we can drop all of the stack-allocated pcvalueCaches and stop carefully passing them around between lots of operations. This significantly simplifies a fair amount of code and makes several structures smaller. This series of changes has no statistically significant effect on any runtime Stack benchmarks. I also experimented with making the cache larger, now that the impact is limited to the M struct, but wasn't able to measure any improvements. This is a re-roll of CL 515277 Change-Id: Ia27529302f81c1c92fb9c3a7474739eca80bfca1 Reviewed-on: https://go-review.googlesource.com/c/go/+/520064 Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com>
This commit is contained in:
parent
4a8373c553
commit
caf9e15fb7
15 changed files with 37 additions and 48 deletions
|
|
@ -555,7 +555,6 @@ var ptrnames = []string{
|
|||
type adjustinfo struct {
|
||||
old stack
|
||||
delta uintptr // ptr distance from old to new stack (newbase - oldbase)
|
||||
cache pcvalueCache
|
||||
|
||||
// sghi is the highest sudog.elem on the stack.
|
||||
sghi uintptr
|
||||
|
|
@ -676,7 +675,7 @@ func adjustframe(frame *stkframe, adjinfo *adjustinfo) {
|
|||
adjustpointer(adjinfo, unsafe.Pointer(frame.varp))
|
||||
}
|
||||
|
||||
locals, args, objs := frame.getStackMap(&adjinfo.cache, true)
|
||||
locals, args, objs := frame.getStackMap(true)
|
||||
|
||||
// Adjust local variables if stack frame has been allocated.
|
||||
if locals.n > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue