aboutsummaryrefslogtreecommitdiff
path: root/acid
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-09-17 22:06:42 +0000
committerrsc <devnull@localhost>2004-09-17 22:06:42 +0000
commit80e841abcf573502565d34aedd50ff3ca71cff0f (patch)
tree48dbad3b39bd37dee381ed5c42d3abb428339b7b /acid
parentbcf527a98e295548629620a7cb06ada951db7822 (diff)
downloadplan9port-80e841abcf573502565d34aedd50ff3ca71cff0f.tar.gz
plan9port-80e841abcf573502565d34aedd50ff3ca71cff0f.tar.bz2
plan9port-80e841abcf573502565d34aedd50ff3ca71cff0f.zip
tweaks
Diffstat (limited to 'acid')
-rw-r--r--acid/thread9
1 files changed, 6 insertions, 3 deletions
diff --git a/acid/thread b/acid/thread
index 5b5337e0..54b2c072 100644
--- a/acid/thread
+++ b/acid/thread
@@ -185,6 +185,7 @@ defn stacks(){
P = (Proc)_threadpq.$head;
while P != 0 do{
proc(P);
+ if mainpid != P.pid then setproc(P.pid);
// setproc(P.pid);
// if P.thread==0 then{
// print("=== thread scheduler stack\n");
@@ -192,6 +193,7 @@ defn stacks(){
// }
// print("threadstks(", P\X, ")\n");
threadstks(P);
+ if mainpid != P.pid then setproc(mainpid);
P = (Proc)P.next;
print("\n");
}
@@ -206,6 +208,7 @@ defn stacksizes(){
P = (Proc)_threadpq.$head;
while P != 0 do{
P = (Proc)P;
+ if mainpid != P.pid then setproc(P.pid);
Tq = (Tqueue)P.threads;
T = (Thread)Tq.$head;
while T != 0 do{
@@ -213,12 +216,12 @@ defn stacksizes(){
if T.state==Running then {
sp = *SP;
}else{
- sp = *(T.sched);
+ sp = T.sched.sp;
}
- sp = *(T.sched);
- print(top-sp\D, "\n");
+ print(top-sp\D, " of ", T.stksize\D, " - 0x", top\X, " 0x", sp\X, " ", *T.stk\X, "\n");
T = (Thread)T.nextt;
}
+ if mainpid != P.pid then setproc(mainpid);
P = P.next;
}
// setproc(mainpid);