projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move a bit of build system code
[ghc-hetmet.git]
/
rts
/
Trace.c
diff --git
a/rts/Trace.c
b/rts/Trace.c
index
a1da991
..
be3fff7
100644
(file)
--- a/
rts/Trace.c
+++ b/
rts/Trace.c
@@
-204,7
+204,7
@@
static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
debugBelch("cap %d: GC done\n", cap->no);
break;
default:
debugBelch("cap %d: GC done\n", cap->no);
break;
default:
- debugBelch("cap %2d: thread %lu: event %d\n\n",
+ debugBelch("cap %d: thread %lu: event %d\n\n",
cap->no, (lnat)tso->id, tag);
break;
}
cap->no, (lnat)tso->id, tag);
break;
}
@@
-244,7
+244,7
@@
static void traceCap_stderr(Capability *cap, char *msg, va_list ap)
ACQUIRE_LOCK(&trace_utx);
tracePreface();
ACQUIRE_LOCK(&trace_utx);
tracePreface();
- debugBelch("cap %2d: ", cap->no);
+ debugBelch("cap %d: ", cap->no);
vdebugBelch(msg,ap);
debugBelch("\n");
vdebugBelch(msg,ap);
debugBelch("\n");
@@
-299,21
+299,29
@@
void trace_(char *msg, ...)
va_end(ap);
}
va_end(ap);
}
-void traceUserMsg(Capability *cap, char *msg)
+static void traceFormatUserMsg(Capability *cap, char *msg, ...)
{
{
+ va_list ap;
+ va_start(ap,msg);
+
#ifdef DEBUG
if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) {
#ifdef DEBUG
if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) {
- traceCap_stderr(cap, msg, NULL);
+ traceCap_stderr(cap, msg, ap);
} else
#endif
{
if (eventlog_enabled) {
} else
#endif
{
if (eventlog_enabled) {
- postUserMsg(cap, msg);
+ postUserMsg(cap, msg, ap);
}
}
dtraceUserMsg(cap->no, msg);
}
}
}
dtraceUserMsg(cap->no, msg);
}
+void traceUserMsg(Capability *cap, char *msg)
+{
+ traceFormatUserMsg(cap, "%s", msg);
+}
+
void traceThreadStatus_ (StgTSO *tso USED_IF_DEBUG)
{
#ifdef DEBUG
void traceThreadStatus_ (StgTSO *tso USED_IF_DEBUG)
{
#ifdef DEBUG