diff options
Diffstat (limited to 'usr/austin/ogle/rruntime.go')
-rw-r--r-- | usr/austin/ogle/rruntime.go | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/usr/austin/ogle/rruntime.go b/usr/austin/ogle/rruntime.go index 685cc95a7..e0a654691 100644 --- a/usr/austin/ogle/rruntime.go +++ b/usr/austin/ogle/rruntime.go @@ -123,10 +123,28 @@ type rt1Gobuf struct { } type rt1G struct { - stackguard uintptr; + // Fields beginning with _ are only for padding + _stackguard uintptr; stackbase *rt1Stktop; + _defer uintptr; + sched rt1Gobuf; + _stack0 uintptr; + _entry uintptr; + alllink *rt1G; + _param uintptr; + status int16; } +var rt1GStatus = runtimeGStatus{ + Gidle: 0, + Grunnable: 1, + Grunning: 2, + Gsyscall: 3, + Gwaiting: 4, + Gmoribund: 5, + Gdead: 6, +}; + // runtimeIndexes stores the indexes of fields in the runtime // structures. It is filled in using reflection, so the name of the // fields must match the names of the remoteType's in runtimeValues @@ -175,10 +193,15 @@ type runtimeIndexes struct { Sp, Pc, G int; }; G struct { - Stackguard, Stackbase int; + Stackbase, Sched, Status int; }; } +// Values of G status codes +type runtimeGStatus struct { + Gidle, Grunnable, Grunning, Gsyscall, Gwaiting, Gmoribund, Gdead int64; +} + // runtimeValues stores the types and values that correspond to those // in the remote runtime package. type runtimeValues struct { @@ -200,6 +223,8 @@ type runtimeValues struct { PArrayType, PStringType, PStructType, PPtrType, PFuncType, PInterfaceType, PSliceType, PMapType, PChanType, PDotDotDotType, PUnsafePointerType ptrace.Word; + // G status values + runtimeGStatus; } // fillRuntimeIndexes fills a runtimeIndexes structure will the field |