From aca6577196d61073a74c2ba791aa89c166db9521 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 1 Aug 2023 14:41:42 -0400 Subject: 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. Change-Id: I4719ebf347c7150a05e887e75a238e23647c20cd Reviewed-on: https://go-review.googlesource.com/c/go/+/515277 TryBot-Result: Gopher Robot Auto-Submit: Austin Clements Reviewed-by: Michael Knyszek Run-TryBot: Austin Clements Reviewed-by: Carlos Amedee --- src/runtime/stack.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/runtime/stack.go') diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 903b096f08..61cd0a0fdd 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -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 { -- cgit v1.3