tracing: Kill EVENT_STARTUP
authorBen Gamari <ben@smart-cactus.org>
Mon, 31 Aug 2015 20:39:13 +0000 (22:39 +0200)
committerBen Gamari <ben@smart-cactus.org>
Sat, 5 Sep 2015 08:54:45 +0000 (10:54 +0200)
This has been unnecessary for quite some time due to the create/delete
capability events.

includes/rts/EventLogFormat.h
rts/RtsStartup.c
rts/Trace.c
rts/Trace.h
rts/eventlog/EventLog.c
rts/eventlog/EventLog.h

index a1e038f..68d0d08 100644 (file)
 /* 13, 14 deprecated */
 #define EVENT_CREATE_SPARK_THREAD 15 /* (spark_thread)         */
 #define EVENT_LOG_MSG             16 /* (message ...)          */
-/* EVENT_STARTUP should be deprecated at some point */
-#define EVENT_STARTUP             17 /* (num_capabilities)     */
+/* 17 deprecated */
 #define EVENT_BLOCK_MARKER        18 /* (size, end_time, capability) */
 #define EVENT_USER_MSG            19 /* (message ...)          */
 #define EVENT_GC_IDLE             20 /* () */
 /* ghc changed how it handles sparks so these are no longer applicable */
 #define EVENT_CREATE_SPARK        13 /* (cap, thread) */
 #define EVENT_SPARK_TO_THREAD     14 /* (cap, thread, spark_thread) */
+#define EVENT_STARTUP             17 /* (num_capabilities)     */
 /* these are used by eden but are replaced by new alternatives for ghc */
 #define EVENT_VERSION             23 /* (version_string) */
 #define EVENT_PROGRAM_INVOCATION  24 /* (commandline_string) */
index f6544b6..584c31e 100644 (file)
@@ -176,9 +176,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
 #ifdef TRACING
     initTracing();
 #endif
-    /* Trace the startup event
-     */
-    traceEventStartup();
 
     /* initialise scheduler data structures (needs to be done before
      * initStorage()).
index dab7347..0ab636a 100644 (file)
@@ -759,13 +759,6 @@ void traceThreadStatus_ (StgTSO *tso USED_IF_DEBUG)
     }
 }
 
-void traceEventStartup_(int nocaps)
-{
-    if (eventlog_enabled) {
-        postEventStartup(nocaps);
-    }
-}
-
 #ifdef DEBUG
 void traceBegin (const char *str, ...)
 {
index 31aefcb..c85167c 100644 (file)
@@ -242,8 +242,6 @@ void traceThreadLabel_(Capability *cap,
 
 void traceThreadStatus_ (StgTSO *tso);
 
-void traceEventStartup_ (int n_caps);
-
 /*
  * Events for describing capabilities and capability sets in the eventlog
  *
@@ -298,7 +296,6 @@ void traceTaskDelete_ (Task       *task);
 #define debugTraceCap(class, cap, str, ...) /* nothing */
 #define traceThreadStatus(class, tso) /* nothing */
 #define traceThreadLabel_(cap, tso, label) /* nothing */
-INLINE_HEADER void traceEventStartup_ (int n_caps STG_UNUSED) {};
 #define traceCapEvent(cap, tag) /* nothing */
 #define traceCapsetEvent(tag, capset, info) /* nothing */
 #define traceWallClockTime_() /* nothing */
@@ -350,9 +347,6 @@ void dtraceUserMarkerWrapper(Capability *cap, char *msg);
     HASKELLEVENT_CREATE_SPARK_THREAD(cap, spark_tid)
 #define dtraceThreadLabel(cap, tso, label)              \
     HASKELLEVENT_THREAD_LABEL(cap, tso, label)
-INLINE_HEADER void dtraceStartup (int num_caps) {
-    HASKELLEVENT_STARTUP(num_caps);
-}
 #define dtraceCapCreate(cap)                            \
     HASKELLEVENT_CAP_CREATE(cap)
 #define dtraceCapDelete(cap)                            \
@@ -442,7 +436,6 @@ INLINE_HEADER void dtraceStartup (int num_caps) {
 #define dtraceRequestParGc(cap)                         /* nothing */
 #define dtraceCreateSparkThread(cap, spark_tid)         /* nothing */
 #define dtraceThreadLabel(cap, tso, label)              /* nothing */
-INLINE_HEADER void dtraceStartup (int num_caps STG_UNUSED) {};
 #define dtraceUserMsg(cap, msg)                         /* nothing */
 #define dtraceUserMarker(cap, msg)                      /* nothing */
 #define dtraceGcIdle(cap)                               /* nothing */
@@ -710,23 +703,6 @@ INLINE_HEADER void traceEventHeapLive(Capability *cap         STG_UNUSED,
     dtraceEventHeapLive(heap_capset, heap_live);
 }
 
-/* TODO: at some point we should remove this event, it's covered by
- * the cap create/delete events.
- */
-INLINE_HEADER void traceEventStartup(void)
-{
-    int n_caps;
-#ifdef THREADED_RTS
-    // XXX n_capabilities hasn't been initialised yet
-    n_caps = RtsFlags.ParFlags.nNodes;
-#else
-    n_caps = 1;
-#endif
-
-    traceEventStartup_(n_caps);
-    dtraceStartup(n_caps);
-}
-
 INLINE_HEADER void traceCapsetCreate(CapsetID   capset      STG_UNUSED,
                                      CapsetType capset_type STG_UNUSED)
 {
index c55ac2c..2153942 100644 (file)
@@ -62,7 +62,6 @@ char *EventDesc[] = {
   [EVENT_MIGRATE_THREAD]      = "Migrate thread",
   [EVENT_THREAD_WAKEUP]       = "Wakeup thread",
   [EVENT_THREAD_LABEL]        = "Thread label",
-  [EVENT_STARTUP]             = "Create capabilities",
   [EVENT_CAP_CREATE]          = "Create capability",
   [EVENT_CAP_DELETE]          = "Delete capability",
   [EVENT_CAP_DISABLE]         = "Disable capability",
@@ -312,7 +311,6 @@ initEventLogging(void)
                                + sizeof(EventThreadID);
             break;
 
-        case EVENT_STARTUP:         // (cap_count)
         case EVENT_CAP_CREATE:      // (cap)
         case EVENT_CAP_DELETE:      // (cap)
         case EVENT_CAP_ENABLE:      // (cap)
@@ -1022,18 +1020,6 @@ void postCapMsg(Capability *cap, char *msg, va_list ap)
     postLogMsg(&capEventBuf[cap->no], EVENT_LOG_MSG, msg, ap);
 }
 
-void postEventStartup(EventCapNo n_caps)
-{
-    ACQUIRE_LOCK(&eventBufMutex);
-    ensureRoomForEvent(&eventBuf, EVENT_STARTUP);
-
-    // Post a STARTUP event with the number of capabilities
-    postEventHeader(&eventBuf, EVENT_STARTUP);
-    postCapNo(&eventBuf, n_caps);
-
-    RELEASE_LOCK(&eventBufMutex);
-}
-
 void postUserEvent(Capability *cap, EventTypeNum type, char *msg)
 {
     EventsBuf *eb;
index 9c2f265..abe7880 100644 (file)
@@ -49,8 +49,6 @@ void postUserEvent(Capability *cap, EventTypeNum type, char *msg);
 
 void postCapMsg(Capability *cap, char *msg, va_list ap);
 
-void postEventStartup(EventCapNo n_caps);
-
 /*
  * Post an event relating to a capability itself (create/delete/etc)
  */