diff options
author | Austin Clements <aclements@csail.mit.edu> | 2009-09-01 13:01:37 -0700 |
---|---|---|
committer | Austin Clements <aclements@csail.mit.edu> | 2009-09-01 13:01:37 -0700 |
commit | a9fec6c6215fb66ec448c996278026436639baca (patch) | |
tree | 3e310ee172b67c41e46bb9ee64adb8773932ec84 /usr/austin/ogle/rruntime.go | |
parent | d1fcffbf593b99333555b3463866c6d1db5028f4 (diff) | |
download | golang-a9fec6c6215fb66ec448c996278026436639baca.tar.gz |
Add stack frame support. Architectures are now responsible
for decoding closures. There is now no notion of a current OS
thread, though that needs to come back in the form of a
current Go thread. As a result, Process now implements Peek
and Poke and maps them to any stopped OS thread, since they
all share the address space anyways.
R=rsc
APPROVED=rsc
DELTA=322 (310 added, 3 deleted, 9 changed)
OCL=34136
CL=34201
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 |