X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FThreads.c;h=3b209ea95b51ccc5b86c795be574f5b835153456;hb=abc6d6fab6ff9ebbdee9424d5ba7f1c37c41bac8;hp=8318e28ca9236e95fbc649ae38da11e97bea3d2d;hpb=c5cafbcca54c4b1117bc43b31d86afa583fb7f62;p=ghc-hetmet.git diff --git a/rts/Threads.c b/rts/Threads.c index 8318e28..3b209ea 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -106,11 +106,9 @@ createThread(Capability *cap, nat size) g0s0->threads = tso; RELEASE_LOCK(&sched_mutex); - postEvent (cap, EVENT_CREATE_THREAD, tso->id, 0); + // ToDo: report the stack size in the event? + traceSchedEvent (cap, EVENT_CREATE_THREAD, tso, tso->stack_size); - debugTrace(DEBUG_sched, - "created thread %ld, stack size = %lx words", - (long)tso->id, (long)tso->stack_size); return tso; } @@ -256,10 +254,7 @@ unblockOne_ (Capability *cap, StgTSO *tso, cap->context_switch = 1; #endif - postEvent (cap, EVENT_THREAD_WAKEUP, tso->id, tso->cap->no); - - debugTrace(DEBUG_sched, "waking up thread %ld on cap %d", - (long)tso->id, tso->cap->no); + traceSchedEvent (cap, EVENT_THREAD_WAKEUP, tso, tso->cap->no); return next; } @@ -357,6 +352,7 @@ printThreadBlockage(StgTSO *tso) } } + void printThreadStatus(StgTSO *t) {