diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-01-27 16:42:26 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-01-27 16:42:26 +0000 |
commit | 784e214dd44eba39f4c34936a27e6cc82948205c (patch) | |
tree | 42ce7135e1045117461118f7cbc098df5e707138 /rts/eventlog | |
parent | 069cd16951bd45a55c94b5adce048c4ec9aad2c8 (diff) | |
download | haskell-784e214dd44eba39f4c34936a27e6cc82948205c.tar.gz |
Annotate thread stop events with the owner of the black hole
So we can now get these in ThreadScope:
19487000: cap 1: stopping thread 6 (blocked on black hole owned by thread 4)
Note: needs an update to ghc-events. Older ThreadScopes will just
ignore the new information.
Diffstat (limited to 'rts/eventlog')
-rw-r--r-- | rts/eventlog/EventLog.c | 12 | ||||
-rw-r--r-- | rts/eventlog/EventLog.h | 5 |
2 files changed, 10 insertions, 7 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index fec34b9647..a77c257e1b 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -252,7 +252,7 @@ initEventLogging(void) case EVENT_STOP_THREAD: // (cap, thread, status) eventTypes[t].size = - sizeof(EventThreadID) + sizeof(StgWord16); + sizeof(EventThreadID) + sizeof(StgWord16) + sizeof(EventThreadID); break; case EVENT_STARTUP: // (cap count) @@ -382,7 +382,8 @@ void postSchedEvent (Capability *cap, EventTypeNum tag, StgThreadID thread, - StgWord64 other) + StgWord info1, + StgWord info2) { EventsBuf *eb; @@ -407,7 +408,7 @@ postSchedEvent (Capability *cap, case EVENT_CREATE_SPARK_THREAD: // (cap, spark_thread) { - postThreadID(eb,other /* spark_thread */); + postThreadID(eb,info1 /* spark_thread */); break; } @@ -416,14 +417,15 @@ postSchedEvent (Capability *cap, case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap) { postThreadID(eb,thread); - postCapNo(eb,other /* new_cap | victim_cap | other_cap */); + postCapNo(eb,info1 /* new_cap | victim_cap | other_cap */); break; } case EVENT_STOP_THREAD: // (cap, thread, status) { postThreadID(eb,thread); - postWord16(eb,other /* status */); + postWord16(eb,info1 /* status */); + postThreadID(eb,info2 /* blocked on thread */); break; } diff --git a/rts/eventlog/EventLog.h b/rts/eventlog/EventLog.h index 7dc249d35d..0cfab5c091 100644 --- a/rts/eventlog/EventLog.h +++ b/rts/eventlog/EventLog.h @@ -32,7 +32,7 @@ void flushEventLog(void); // event log inherited from parent * that has an associated thread). */ void postSchedEvent(Capability *cap, EventTypeNum tag, - StgThreadID id, StgWord64 other); + StgThreadID id, StgWord info1, StgWord info2); /* * Post a nullary event. @@ -50,7 +50,8 @@ void postCapMsg(Capability *cap, char *msg, va_list ap); INLINE_HEADER void postSchedEvent (Capability *cap STG_UNUSED, EventTypeNum tag STG_UNUSED, StgThreadID id STG_UNUSED, - StgWord64 other STG_UNUSED) + StgWord info1 STG_UNUSED, + StgWord info2 STG_UNUSED) { /* nothing */ } INLINE_HEADER void postEvent (Capability *cap STG_UNUSED, |