Commit 43c68d65 authored by Austin Seipp's avatar Austin Seipp
Browse files

rts: detabify/dewhitespace Trace.c


Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 514a6310
......@@ -165,7 +165,7 @@ static void tracePreface (void)
debugBelch("%12lx: ", (unsigned long)osThreadId());
#endif
if (RtsFlags.TraceFlags.timestamp) {
debugBelch("%9" FMT_Word64 ": ", stat_getElapsedTime());
debugBelch("%9" FMT_Word64 ": ", stat_getElapsedTime());
}
}
#endif
......@@ -194,8 +194,8 @@ static char *thread_stop_reasons[] = {
#endif
#ifdef DEBUG
static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
StgTSO *tso,
static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
StgTSO *tso,
StgWord info1 STG_UNUSED,
StgWord info2 STG_UNUSED)
{
......@@ -204,26 +204,26 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
tracePreface();
switch (tag) {
case EVENT_CREATE_THREAD: // (cap, thread)
debugBelch("cap %d: created thread %" FMT_Word "\n",
debugBelch("cap %d: created thread %" FMT_Word "\n",
cap->no, (W_)tso->id);
break;
case EVENT_RUN_THREAD: // (cap, thread)
debugBelch("cap %d: running thread %" FMT_Word " (%s)\n",
debugBelch("cap %d: running thread %" FMT_Word " (%s)\n",
cap->no, (W_)tso->id, what_next_strs[tso->what_next]);
break;
case EVENT_THREAD_RUNNABLE: // (cap, thread)
debugBelch("cap %d: thread %" FMT_Word " appended to run queue\n",
debugBelch("cap %d: thread %" FMT_Word " appended to run queue\n",
cap->no, (W_)tso->id);
break;
case EVENT_MIGRATE_THREAD: // (cap, thread, new_cap)
debugBelch("cap %d: thread %" FMT_Word " migrating to cap %d\n",
debugBelch("cap %d: thread %" FMT_Word " migrating to cap %d\n",
cap->no, (W_)tso->id, (int)info1);
break;
case EVENT_THREAD_WAKEUP: // (cap, thread, info1_cap)
debugBelch("cap %d: waking up thread %" FMT_Word " on cap %d\n",
debugBelch("cap %d: waking up thread %" FMT_Word " on cap %d\n",
cap->no, (W_)tso->id, (int)info1);
break;
case EVENT_STOP_THREAD: // (cap, thread, status)
if (info1 == 6 + BlockedOnBlackHole) {
debugBelch("cap %d: thread %" FMT_Word " stopped (blocked on black hole owned by thread %lu)\n",
......@@ -234,7 +234,7 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
}
break;
default:
debugBelch("cap %d: thread %" FMT_Word ": event %d\n\n",
debugBelch("cap %d: thread %" FMT_Word ": event %d\n\n",
cap->no, (W_)tso->id, tag);
break;
}
......@@ -243,7 +243,7 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
}
#endif
void traceSchedEvent_ (Capability *cap, EventTypeNum tag,
void traceSchedEvent_ (Capability *cap, EventTypeNum tag,
StgTSO *tso, StgWord info1, StgWord info2)
{
#ifdef DEBUG
......@@ -499,7 +499,7 @@ void traceOSProcessInfo_(void) {
}
#ifdef DEBUG
static void traceSparkEvent_stderr (Capability *cap, EventTypeNum tag,
static void traceSparkEvent_stderr (Capability *cap, EventTypeNum tag,
StgWord info1)
{
ACQUIRE_LOCK(&trace_utx);
......@@ -508,7 +508,7 @@ static void traceSparkEvent_stderr (Capability *cap, EventTypeNum tag,
switch (tag) {
case EVENT_CREATE_SPARK_THREAD: // (cap, spark_thread)
debugBelch("cap %d: creating spark thread %lu\n",
debugBelch("cap %d: creating spark thread %lu\n",
cap->no, (long)info1);
break;
case EVENT_SPARK_CREATE: // (cap)
......@@ -516,27 +516,27 @@ static void traceSparkEvent_stderr (Capability *cap, EventTypeNum tag,
cap->no);
break;
case EVENT_SPARK_DUD: // (cap)
debugBelch("cap %d: discarded dud spark\n",
debugBelch("cap %d: discarded dud spark\n",
cap->no);
break;
case EVENT_SPARK_OVERFLOW: // (cap)
debugBelch("cap %d: discarded overflowed spark\n",
debugBelch("cap %d: discarded overflowed spark\n",
cap->no);
break;
case EVENT_SPARK_RUN: // (cap)
debugBelch("cap %d: running a spark\n",
debugBelch("cap %d: running a spark\n",
cap->no);
break;
case EVENT_SPARK_STEAL: // (cap, victim_cap)
debugBelch("cap %d: stealing a spark from cap %d\n",
debugBelch("cap %d: stealing a spark from cap %d\n",
cap->no, (int)info1);
break;
case EVENT_SPARK_FIZZLE: // (cap)
debugBelch("cap %d: fizzled spark removed from pool\n",
debugBelch("cap %d: fizzled spark removed from pool\n",
cap->no);
break;
case EVENT_SPARK_GC: // (cap)
debugBelch("cap %d: GCd spark removed from pool\n",
debugBelch("cap %d: GCd spark removed from pool\n",
cap->no);
break;
default:
......@@ -639,7 +639,7 @@ void traceCap_(Capability *cap, char *msg, ...)
{
va_list ap;
va_start(ap,msg);
#ifdef DEBUG
if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) {
traceCap_stderr(cap, msg, ap);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment