tracing/runtime: Add support for Go1.19
Generate g for today's state of Go 1.19 (go1.19.2-0-g895664482c). Compared to Go1.18 the only change is that new field `goroutineProfiled` is added to g struct. Regenerated files stay without changes for Go1.18 and previous releases. ---- 8< ---- diff --git a/zruntime_g_go1.18.go b/zruntime_g_go1.19.go index 76f905d..3b33cbe 100644 --- a/zruntime_g_go1.18.go +++ b/zruntime_g_go1.19.go @@ -1,10 +1,11 @@ // Code generated by g_typedef; DO NOT EDIT. -// +build go1.18,!go1.19 +// +build go1.19,!go1.20 package xruntime import "unsafe" +import "sync/atomic" type g struct { // Stack parameters. @@ -91,6 +92,10 @@ type g struct { timer *timer // cached timer for time.Sleep selectDone uint32 // are we participating in a select and did someone win the race? + // goroutineProfiled indicates the status of this goroutine's stack for the + // current in-progress goroutine profile + goroutineProfiled goroutineProfileStateHolder + // gcAssistBytes is this G's GC assist credit in terms of // bytes allocated. If this is positive, then the G has credit // to allocate gcAssistBytes bytes without assisting. If this @@ -195,6 +200,7 @@ type ancestorInfo struct { goid int64 // goroutine id of this goroutine; original goroutine possibly dead gopc uintptr // pc of go statement that created this goroutine } +type goroutineProfileStateHolder atomic.Uint32 type uintreg uint // FIXME wrong on amd64p32 type m struct {} // FIXME stub type sudog struct {} // FIXME stub
Showing