X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=inline;f=rts%2Feventlog%2FEventLog.c;h=ef512281eca98bbaa2c13c8bb9076dc076fc2f36;hb=fff1f6194c3c39de53cd645bda9865fb131b1c68;hp=a48c92e457ad623b4492db7081e26a313ea68478;hpb=1f56fae4a10f7fb56b8fbab5ab9ad95add1ed1dd;p=ghc-hetmet.git diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index a48c92e..ef51228 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -13,7 +13,6 @@ #include "Trace.h" #include "Capability.h" -#include "Trace.h" #include "RtsUtils.h" #include "Stats.h" #include "EventLog.h" @@ -236,12 +235,15 @@ initEventLogging(void) sizeof(EventThreadID) + sizeof(StgWord16); break; + case EVENT_STARTUP: // (cap count) + eventTypes[t].size = sizeof(EventCapNo); + break; + case EVENT_SHUTDOWN: // (cap) case EVENT_REQUEST_SEQ_GC: // (cap) case EVENT_REQUEST_PAR_GC: // (cap) case EVENT_GC_START: // (cap) case EVENT_GC_END: // (cap) - case EVENT_STARTUP: case EVENT_GC_IDLE: case EVENT_GC_WORK: case EVENT_GC_DONE: @@ -289,6 +291,10 @@ initEventLogging(void) for (c = 0; c < n_caps; ++c) { postBlockMarker(&capEventBuf[c]); } + +#ifdef THREADED_RTS + initMutex(&eventBufMutex); +#endif } void @@ -449,9 +455,9 @@ void postCapMsg(Capability *cap, char *msg, va_list ap) postLogMsg(&capEventBuf[cap->no], EVENT_LOG_MSG, msg, ap); } -void postUserMsg(Capability *cap, char *msg) +void postUserMsg(Capability *cap, char *msg, va_list ap) { - postLogMsg(&capEventBuf[cap->no], EVENT_USER_MSG, msg, NULL); + postLogMsg(&capEventBuf[cap->no], EVENT_USER_MSG, msg, ap); } void closeBlockMarker (EventsBuf *ebuf)