summaryrefslogtreecommitdiff
path: root/rts/Sparks.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-08-29 09:47:27 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-08-29 09:47:27 +0000
commita5288c551349a0adab0d931a429b10a096d9444d (patch)
tree245dd2dfd2b4e23f3fc8ae474b709289b60e5f15 /rts/Sparks.c
parentc51229b2bfd3b1a61d3966db894210ef848f0a6d (diff)
downloadhaskell-a5288c551349a0adab0d931a429b10a096d9444d.tar.gz
Unify event logging and debug tracing.
- tracing facilities are now enabled with -DTRACING, and -DDEBUG additionally enables debug-tracing. -DEVENTLOG has been removed. - -debug now implies -eventlog - events can be printed to stderr instead of being sent to the binary .eventlog file by adding +RTS -v (which is implied by the +RTS -Dx options). - -Dx debug messages can be sent to the binary .eventlog file by adding +RTS -l. This should help debugging by reducing the impact of debug tracing on execution time. - Various debug messages that duplicated the information in events have been removed.
Diffstat (limited to 'rts/Sparks.c')
-rw-r--r--rts/Sparks.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/rts/Sparks.c b/rts/Sparks.c
index ff4beb7fd5..a17b78ce57 100644
--- a/rts/Sparks.c
+++ b/rts/Sparks.c
@@ -47,7 +47,7 @@ createSparkThread (Capability *cap)
tso = createIOThread (cap, RtsFlags.GcFlags.initialStkSize,
&base_GHCziConc_runSparks_closure);
- postEvent(cap, EVENT_CREATE_SPARK_THREAD, 0, tso->id);
+ traceSchedEvent(cap, EVENT_CREATE_SPARK_THREAD, 0, tso->id);
appendToRunQueue(cap,tso);
}
@@ -75,8 +75,6 @@ newSpark (StgRegTable *reg, StgClosure *p)
cap->sparks_created++;
- postEvent(cap, EVENT_CREATE_SPARK, cap->r.rCurrentTSO->id, 0);
-
return 1;
}
@@ -140,7 +138,7 @@ pruneSparkQueue (evac_fn evac, void *user, Capability *cap)
pool->top &= pool->moduloSize;
pool->topBound = pool->top;
- debugTrace(DEBUG_sched,
+ debugTrace(DEBUG_sparks,
"markSparkQueue: current spark queue len=%ld; (hd=%ld; tl=%ld)",
sparkPoolSize(pool), pool->bottom, pool->top);
@@ -238,9 +236,9 @@ pruneSparkQueue (evac_fn evac, void *user, Capability *cap)
pool->bottom = (oldBotInd <= botInd) ? botInd : (botInd + pool->size);
// first free place we did not use (corrected by wraparound)
- debugTrace(DEBUG_sched, "pruned %d sparks", pruned_sparks);
+ debugTrace(DEBUG_sparks, "pruned %d sparks", pruned_sparks);
- debugTrace(DEBUG_sched,
+ debugTrace(DEBUG_sparks,
"new spark queue len=%ld; (hd=%ld; tl=%ld)",
sparkPoolSize(pool), pool->bottom, pool->top);
@@ -274,7 +272,7 @@ traverseSparkQueue (evac_fn evac, void *user, Capability *cap)
top++;
}
- debugTrace(DEBUG_sched,
+ debugTrace(DEBUG_sparks,
"traversed spark queue, len=%ld; (hd=%ld; tl=%ld)",
sparkPoolSize(pool), pool->bottom, pool->top);
}