aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2023-05-10 20:42:23 +0000
committerGopher Robot <gobot@golang.org>2023-05-17 14:46:57 +0000
commitb7e767b022f96687ecbde61ee7efd61a711f798b (patch)
tree420f8dede989e202fb29b818617bf5f0451686a6 /src/runtime/runtime2.go
parent2f35a655e73837a95941eeda00f56c799ee64591 (diff)
downloadgo-b7e767b022f96687ecbde61ee7efd61a711f798b.tar.xz
runtime: capture per-p trace state in a type
More tightening up of the tracer's interface. Change-Id: I992141c7f30e5c2d5d77d1fcd6817d35bc6e5f6d Reviewed-on: https://go-review.googlesource.com/c/go/+/494191 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 0350052a25..314ab194e7 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -674,15 +674,7 @@ type p struct {
buf [128]*mspan
}
- tracebuf traceBufPtr
-
- // traceSweep indicates the sweep events should be traced.
- // This is used to defer the sweep start event until a span
- // has actually been swept.
- traceSweep bool
- // traceSwept and traceReclaimed track the number of bytes
- // swept and reclaimed by sweeping in the current sweep loop.
- traceSwept, traceReclaimed uintptr
+ trace pTraceState
palloc persistentAlloc // per-P to avoid mutex