From: Rhys Hiltner Date: Wed, 4 May 2022 14:26:21 +0000 (-0700) Subject: runtime: use profile data before advancing index X-Git-Tag: go1.19beta1~421 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1926fa5f84b87a7a6cb9f153337424baf367937a;p=gostls13.git runtime: use profile data before advancing index Fixes #52704 Change-Id: Ia2104c62d7ea9d67469144948b2ceb5d9f1313b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/404054 Run-TryBot: Rhys Hiltner TryBot-Result: Gopher Robot Reviewed-by: Michael Knyszek Reviewed-by: Bryan Mills --- diff --git a/src/runtime/trace.go b/src/runtime/trace.go index 19c966800c..10436d80c2 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -745,6 +745,7 @@ func traceReadCPU() { } goid := data[3] stk := data[4:data[0]] + empty := len(stk) == 1 && data[2] == 0 && data[3] == 0 data = data[data[0]:] // No support here for reporting goroutine tags at the moment; if // that information is to be part of the execution trace, we'd @@ -752,7 +753,7 @@ func traceReadCPU() { // change, instead of only seeing them when we get a CPU sample. tags = tags[1:] - if len(stk) == 1 && data[2] == 0 && data[3] == 0 { + if empty { // Looks like an overflow record from the profBuf. Not much to // do here, we only want to report full records. //