aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2021-04-01 18:38:14 +0000
committerMichael Knyszek <mknyszek@google.com>2021-04-14 14:03:30 +0000
commit3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130 (patch)
treeabf7818886bab73bb0a5618f01298fd136a6b315 /src/internal
parente224787fef3227587aceddbe21a792e3102d3cfb (diff)
downloadgo-3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130.tar.gz
go-3eaf75c13a2e86ff9f9ab8014caa7fc6b855f130.zip
runtime: move next_gc and last_next_gc into gcControllerState
This change moves next_gc and last_next_gc into gcControllerState under the names heapGoal and lastHeapGoal respectively. These are fundamentally GC pacer related values, and so it makes sense for them to live here. Partially generated by rf ' ex . { memstats.next_gc -> gcController.heapGoal memstats.last_next_gc -> gcController.lastHeapGoal } ' except for updates to comments and gcControllerState methods, where they're accessed through the receiver, and trace-related renames of NextGC -> HeapGoal, while we're here. For #44167. Change-Id: I1e871ad78a57b01be8d9f71bd662530c84853bed Reviewed-on: https://go-review.googlesource.com/c/go/+/306603 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/trace/parser.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/internal/trace/parser.go b/src/internal/trace/parser.go
index c371ff3092..254f20137b 100644
--- a/src/internal/trace/parser.go
+++ b/src/internal/trace/parser.go
@@ -1042,8 +1042,8 @@ const (
EvGoSysBlock = 30 // syscall blocks [timestamp]
EvGoWaiting = 31 // denotes that goroutine is blocked when tracing starts [timestamp, goroutine id]
EvGoInSyscall = 32 // denotes that goroutine is in syscall when tracing starts [timestamp, goroutine id]
- EvHeapAlloc = 33 // memstats.heap_live change [timestamp, heap_alloc]
- EvNextGC = 34 // memstats.next_gc change [timestamp, next_gc]
+ EvHeapAlloc = 33 // gcController.heapLive change [timestamp, heap live bytes]
+ EvHeapGoal = 34 // gcController.heapGoal change [timestamp, heap goal bytes]
EvTimerGoroutine = 35 // denotes timer goroutine [timer goroutine id]
EvFutileWakeup = 36 // denotes that the previous wakeup of this goroutine was futile [timestamp]
EvString = 37 // string dictionary entry [ID, length, string]
@@ -1102,7 +1102,7 @@ var EventDescriptions = [EvCount]struct {
EvGoWaiting: {"GoWaiting", 1005, false, []string{"g"}, nil},
EvGoInSyscall: {"GoInSyscall", 1005, false, []string{"g"}, nil},
EvHeapAlloc: {"HeapAlloc", 1005, false, []string{"mem"}, nil},
- EvNextGC: {"NextGC", 1005, false, []string{"mem"}, nil},
+ EvHeapGoal: {"HeapGoal", 1005, false, []string{"mem"}, nil},
EvTimerGoroutine: {"TimerGoroutine", 1005, false, []string{"g"}, nil}, // in 1.5 format it was {"g", "unused"}
EvFutileWakeup: {"FutileWakeup", 1005, false, []string{}, nil},
EvString: {"String", 1007, false, []string{}, nil},