diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2025-06-27 16:40:43 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-07-07 10:31:37 -0700 |
| commit | 75b43f9a97ada1f0fce7a5775d4ab373bd0dad9c (patch) | |
| tree | a796a3c8915b71fb828e4ac635da72aa5d8a35b5 /src/runtime/symtab.go | |
| parent | 20978f46fdf097cf3d9164918441dd296ee274f2 (diff) | |
| download | go-75b43f9a97ada1f0fce7a5775d4ab373bd0dad9c.tar.xz | |
runtime: make traceStack testable and add a benchmark
Change-Id: Ide4daa5eee3fd4f3007d6ef23aa84b8916562c39
Reviewed-on: https://go-review.googlesource.com/c/go/+/684457
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/symtab.go')
| -rw-r--r-- | src/runtime/symtab.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go index 8c6ef2b4fc..866c46a83d 100644 --- a/src/runtime/symtab.go +++ b/src/runtime/symtab.go @@ -981,6 +981,9 @@ func pcvalue(f funcInfo, off uint32, targetpc uintptr, strict bool) (int32, uint // matches the cached contents. const debugCheckCache = false + // If true, skip checking the cache entirely. + const skipCache = false + if off == 0 { return -1, 0 } @@ -991,7 +994,7 @@ func pcvalue(f funcInfo, off uint32, targetpc uintptr, strict bool) (int32, uint var checkVal int32 var checkPC uintptr ck := pcvalueCacheKey(targetpc) - { + if !skipCache { mp := acquirem() cache := &mp.pcvalueCache // The cache can be used by the signal handler on this M. Avoid |
