mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: replace trace.enabled with traceEnabled
[git-generate] cd src/runtime grep -l 'trace\.enabled' *.go | grep -v "trace.go" | xargs sed -i 's/trace\.enabled/traceEnabled()/g' Change-Id: I14c7821c1134690b18c8abc0edd27abcdabcad72 Reviewed-on: https://go-review.googlesource.com/c/go/+/494181 Run-TryBot: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
7484dd30fd
commit
8992bb19ad
8 changed files with 60 additions and 60 deletions
|
|
@ -798,7 +798,7 @@ func (h *mheap) reclaim(npage uintptr) {
|
|||
// traceGCSweepStart/Done pair on the P.
|
||||
mp := acquirem()
|
||||
|
||||
if trace.enabled {
|
||||
if traceEnabled() {
|
||||
traceGCSweepStart()
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ func (h *mheap) reclaim(npage uintptr) {
|
|||
unlock(&h.lock)
|
||||
}
|
||||
|
||||
if trace.enabled {
|
||||
if traceEnabled() {
|
||||
traceGCSweepDone()
|
||||
}
|
||||
releasem(mp)
|
||||
|
|
@ -918,7 +918,7 @@ func (h *mheap) reclaimChunk(arenas []arenaIdx, pageIdx, n uintptr) uintptr {
|
|||
n -= uintptr(len(inUse) * 8)
|
||||
}
|
||||
sweep.active.end(sl)
|
||||
if trace.enabled {
|
||||
if traceEnabled() {
|
||||
unlock(&h.lock)
|
||||
// Account for pages scanned but not reclaimed.
|
||||
traceGCSweepSpan((n0 - nFreed) * pageSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue