From 0e18cf6d093c217cb7f093382cc83f0ea072c2e6 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 20 Jul 2022 12:59:50 -0400 Subject: runtime: trivial replacements of _g_ in GC files Change-Id: Iedf10558d9a1d3b80a151927b99660b688ed9ccb Reviewed-on: https://go-review.googlesource.com/c/go/+/418585 Run-TryBot: Michael Pratt TryBot-Result: Gopher Robot Reviewed-by: Austin Clements --- src/runtime/heapdump.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime/heapdump.go') diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go index c7f2b7a443..543efeded4 100644 --- a/src/runtime/heapdump.go +++ b/src/runtime/heapdump.go @@ -693,9 +693,9 @@ func mdump(m *MemStats) { func writeheapdump_m(fd uintptr, m *MemStats) { assertWorldStopped() - _g_ := getg() - casgstatus(_g_.m.curg, _Grunning, _Gwaiting) - _g_.waitreason = waitReasonDumpingHeap + gp := getg() + casgstatus(gp.m.curg, _Grunning, _Gwaiting) + gp.waitreason = waitReasonDumpingHeap // Set dump file. dumpfd = fd @@ -710,7 +710,7 @@ func writeheapdump_m(fd uintptr, m *MemStats) { tmpbuf = nil } - casgstatus(_g_.m.curg, _Gwaiting, _Grunning) + casgstatus(gp.m.curg, _Gwaiting, _Grunning) } // dumpint() the kind & offset of each field in an object. -- cgit v1.2.1