summaryrefslogtreecommitdiff
path: root/rts/Trace.h
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2011-05-26 16:01:24 +0100
committerDuncan Coutts <duncan@well-typed.com>2011-05-26 18:47:38 +0100
commitc4f9b989c605776c1f07929672a856f07d9b4b44 (patch)
tree9316caee81d203db930b1c8460d6fd694b3bc142 /rts/Trace.h
parent68b76e0e49d4d95e1bfe9343697e2abc99470791 (diff)
downloadhaskell-c4f9b989c605776c1f07929672a856f07d9b4b44.tar.gz
Make the tracing of the startup event more regular
Rather than doing it differently for the eventlog and Dtrace cases.
Diffstat (limited to 'rts/Trace.h')
-rw-r--r--rts/Trace.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/rts/Trace.h b/rts/Trace.h
index 620915665b..b264394399 100644
--- a/rts/Trace.h
+++ b/rts/Trace.h
@@ -160,6 +160,8 @@ void traceUserMsg(Capability *cap, char *msg);
void traceThreadStatus_ (StgTSO *tso);
+void traceEventStartup_ (int n_caps);
+
#else /* !TRACING */
#define traceSchedEvent(cap, tag, tso, other) /* nothing */
@@ -170,6 +172,7 @@ void traceThreadStatus_ (StgTSO *tso);
#define debugTrace(class, str, ...) /* nothing */
#define debugTraceCap(class, cap, str, ...) /* nothing */
#define traceThreadStatus(class, tso) /* nothing */
+#define traceEventStartup_(n_caps) /* nothing */
#endif /* TRACING */
@@ -374,17 +377,18 @@ INLINE_HEADER void traceEventCreateSparkThread(Capability *cap STG_UNUSED,
dtraceCreateSparkThread((EventCapNo)cap->no, (EventThreadID)spark_tid);
}
-// This applies only to dtrace as EVENT_STARTUP in the logging framework is
-// handled specially in 'EventLog.c'.
-//
-INLINE_HEADER void dtraceEventStartup(void)
+INLINE_HEADER void traceEventStartup(void)
{
+ int n_caps;
#ifdef THREADED_RTS
// XXX n_capabilities hasn't been initislised yet
- dtraceStartup(RtsFlags.ParFlags.nNodes);
+ n_caps = RtsFlags.ParFlags.nNodes;
#else
- dtraceStartup(1);
+ n_caps = 1;
#endif
+
+ traceEventStartup_(n_caps);
+ dtraceStartup(n_caps);
}
INLINE_HEADER void traceEventGcIdle(Capability *cap STG_UNUSED)