vectoriser: fix warning
[ghc-hetmet.git] / rts / eventlog / EventLog.c
index a48c92e..ef51228 100644 (file)
@@ -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)