[commit: ghc] master: tracing: Kill EVENT_STARTUP (062feee)

git at git.haskell.org git at git.haskell.org
Sat Sep 5 08:54:12 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/062feee4e7408ad5b9d882e5fed2c700e337db72/ghc

>---------------------------------------------------------------

commit 062feee4e7408ad5b9d882e5fed2c700e337db72
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Aug 31 22:39:13 2015 +0200

    tracing: Kill EVENT_STARTUP
    
    This has been unnecessary for quite some time due to the create/delete
    capability events.


>---------------------------------------------------------------

062feee4e7408ad5b9d882e5fed2c700e337db72
 includes/rts/EventLogFormat.h |  4 ++--
 rts/RtsStartup.c              |  3 ---
 rts/Trace.c                   |  7 -------
 rts/Trace.h                   | 24 ------------------------
 rts/eventlog/EventLog.c       | 14 --------------
 rts/eventlog/EventLog.h       |  2 --
 6 files changed, 2 insertions(+), 52 deletions(-)

diff --git a/includes/rts/EventLogFormat.h b/includes/rts/EventLogFormat.h
index a1e038f..68d0d08 100644
--- a/includes/rts/EventLogFormat.h
+++ b/includes/rts/EventLogFormat.h
@@ -113,8 +113,7 @@
 /* 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 /* () */
@@ -190,6 +189,7 @@
 /* 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) */
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index f6544b6..584c31e 100644
--- a/rts/RtsStartup.c
+++ b/rts/RtsStartup.c
@@ -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()).
diff --git a/rts/Trace.c b/rts/Trace.c
index dab7347..0ab636a 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -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, ...)
 {
diff --git a/rts/Trace.h b/rts/Trace.h
index 31aefcb..c85167c 100644
--- a/rts/Trace.h
+++ b/rts/Trace.h
@@ -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)
 {
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index c55ac2c..2153942 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -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;
diff --git a/rts/eventlog/EventLog.h b/rts/eventlog/EventLog.h
index 9c2f265..abe7880 100644
--- a/rts/eventlog/EventLog.h
+++ b/rts/eventlog/EventLog.h
@@ -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)
  */



More information about the ghc-commits mailing list