Commit 062feee4 authored by Ben Gamari's avatar Ben Gamari 🐢

tracing: Kill EVENT_STARTUP

This has been unnecessary for quite some time due to the create/delete
capability events.
parent 96b986b6
...@@ -113,8 +113,7 @@ ...@@ -113,8 +113,7 @@
/* 13, 14 deprecated */ /* 13, 14 deprecated */
#define EVENT_CREATE_SPARK_THREAD 15 /* (spark_thread) */ #define EVENT_CREATE_SPARK_THREAD 15 /* (spark_thread) */
#define EVENT_LOG_MSG 16 /* (message ...) */ #define EVENT_LOG_MSG 16 /* (message ...) */
/* EVENT_STARTUP should be deprecated at some point */ /* 17 deprecated */
#define EVENT_STARTUP 17 /* (num_capabilities) */
#define EVENT_BLOCK_MARKER 18 /* (size, end_time, capability) */ #define EVENT_BLOCK_MARKER 18 /* (size, end_time, capability) */
#define EVENT_USER_MSG 19 /* (message ...) */ #define EVENT_USER_MSG 19 /* (message ...) */
#define EVENT_GC_IDLE 20 /* () */ #define EVENT_GC_IDLE 20 /* () */
...@@ -190,6 +189,7 @@ ...@@ -190,6 +189,7 @@
/* ghc changed how it handles sparks so these are no longer applicable */ /* ghc changed how it handles sparks so these are no longer applicable */
#define EVENT_CREATE_SPARK 13 /* (cap, thread) */ #define EVENT_CREATE_SPARK 13 /* (cap, thread) */
#define EVENT_SPARK_TO_THREAD 14 /* (cap, thread, spark_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 */ /* these are used by eden but are replaced by new alternatives for ghc */
#define EVENT_VERSION 23 /* (version_string) */ #define EVENT_VERSION 23 /* (version_string) */
#define EVENT_PROGRAM_INVOCATION 24 /* (commandline_string) */ #define EVENT_PROGRAM_INVOCATION 24 /* (commandline_string) */
......
...@@ -176,9 +176,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) ...@@ -176,9 +176,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
#ifdef TRACING #ifdef TRACING
initTracing(); initTracing();
#endif #endif
/* Trace the startup event
*/
traceEventStartup();
/* initialise scheduler data structures (needs to be done before /* initialise scheduler data structures (needs to be done before
* initStorage()). * initStorage()).
......
...@@ -759,13 +759,6 @@ void traceThreadStatus_ (StgTSO *tso USED_IF_DEBUG) ...@@ -759,13 +759,6 @@ void traceThreadStatus_ (StgTSO *tso USED_IF_DEBUG)
} }
} }
void traceEventStartup_(int nocaps)
{
if (eventlog_enabled) {
postEventStartup(nocaps);
}
}
#ifdef DEBUG #ifdef DEBUG
void traceBegin (const char *str, ...) void traceBegin (const char *str, ...)
{ {
......
...@@ -242,8 +242,6 @@ void traceThreadLabel_(Capability *cap, ...@@ -242,8 +242,6 @@ void traceThreadLabel_(Capability *cap,
void traceThreadStatus_ (StgTSO *tso); void traceThreadStatus_ (StgTSO *tso);
void traceEventStartup_ (int n_caps);
/* /*
* Events for describing capabilities and capability sets in the eventlog * Events for describing capabilities and capability sets in the eventlog
* *
...@@ -298,7 +296,6 @@ void traceTaskDelete_ (Task *task); ...@@ -298,7 +296,6 @@ void traceTaskDelete_ (Task *task);
#define debugTraceCap(class, cap, str, ...) /* nothing */ #define debugTraceCap(class, cap, str, ...) /* nothing */
#define traceThreadStatus(class, tso) /* nothing */ #define traceThreadStatus(class, tso) /* nothing */
#define traceThreadLabel_(cap, tso, label) /* nothing */ #define traceThreadLabel_(cap, tso, label) /* nothing */
INLINE_HEADER void traceEventStartup_ (int n_caps STG_UNUSED) {};
#define traceCapEvent(cap, tag) /* nothing */ #define traceCapEvent(cap, tag) /* nothing */
#define traceCapsetEvent(tag, capset, info) /* nothing */ #define traceCapsetEvent(tag, capset, info) /* nothing */
#define traceWallClockTime_() /* nothing */ #define traceWallClockTime_() /* nothing */
...@@ -350,9 +347,6 @@ void dtraceUserMarkerWrapper(Capability *cap, char *msg); ...@@ -350,9 +347,6 @@ void dtraceUserMarkerWrapper(Capability *cap, char *msg);
HASKELLEVENT_CREATE_SPARK_THREAD(cap, spark_tid) HASKELLEVENT_CREATE_SPARK_THREAD(cap, spark_tid)
#define dtraceThreadLabel(cap, tso, label) \ #define dtraceThreadLabel(cap, tso, label) \
HASKELLEVENT_THREAD_LABEL(cap, tso, label) HASKELLEVENT_THREAD_LABEL(cap, tso, label)
INLINE_HEADER void dtraceStartup (int num_caps) {
HASKELLEVENT_STARTUP(num_caps);
}
#define dtraceCapCreate(cap) \ #define dtraceCapCreate(cap) \
HASKELLEVENT_CAP_CREATE(cap) HASKELLEVENT_CAP_CREATE(cap)
#define dtraceCapDelete(cap) \ #define dtraceCapDelete(cap) \
...@@ -442,7 +436,6 @@ INLINE_HEADER void dtraceStartup (int num_caps) { ...@@ -442,7 +436,6 @@ INLINE_HEADER void dtraceStartup (int num_caps) {
#define dtraceRequestParGc(cap) /* nothing */ #define dtraceRequestParGc(cap) /* nothing */
#define dtraceCreateSparkThread(cap, spark_tid) /* nothing */ #define dtraceCreateSparkThread(cap, spark_tid) /* nothing */
#define dtraceThreadLabel(cap, tso, label) /* nothing */ #define dtraceThreadLabel(cap, tso, label) /* nothing */
INLINE_HEADER void dtraceStartup (int num_caps STG_UNUSED) {};
#define dtraceUserMsg(cap, msg) /* nothing */ #define dtraceUserMsg(cap, msg) /* nothing */
#define dtraceUserMarker(cap, msg) /* nothing */ #define dtraceUserMarker(cap, msg) /* nothing */
#define dtraceGcIdle(cap) /* nothing */ #define dtraceGcIdle(cap) /* nothing */
...@@ -710,23 +703,6 @@ INLINE_HEADER void traceEventHeapLive(Capability *cap STG_UNUSED, ...@@ -710,23 +703,6 @@ INLINE_HEADER void traceEventHeapLive(Capability *cap STG_UNUSED,
dtraceEventHeapLive(heap_capset, heap_live); 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, INLINE_HEADER void traceCapsetCreate(CapsetID capset STG_UNUSED,
CapsetType capset_type STG_UNUSED) CapsetType capset_type STG_UNUSED)
{ {
......
...@@ -62,7 +62,6 @@ char *EventDesc[] = { ...@@ -62,7 +62,6 @@ char *EventDesc[] = {
[EVENT_MIGRATE_THREAD] = "Migrate thread", [EVENT_MIGRATE_THREAD] = "Migrate thread",
[EVENT_THREAD_WAKEUP] = "Wakeup thread", [EVENT_THREAD_WAKEUP] = "Wakeup thread",
[EVENT_THREAD_LABEL] = "Thread label", [EVENT_THREAD_LABEL] = "Thread label",
[EVENT_STARTUP] = "Create capabilities",
[EVENT_CAP_CREATE] = "Create capability", [EVENT_CAP_CREATE] = "Create capability",
[EVENT_CAP_DELETE] = "Delete capability", [EVENT_CAP_DELETE] = "Delete capability",
[EVENT_CAP_DISABLE] = "Disable capability", [EVENT_CAP_DISABLE] = "Disable capability",
...@@ -312,7 +311,6 @@ initEventLogging(void) ...@@ -312,7 +311,6 @@ initEventLogging(void)
+ sizeof(EventThreadID); + sizeof(EventThreadID);
break; break;
case EVENT_STARTUP: // (cap_count)
case EVENT_CAP_CREATE: // (cap) case EVENT_CAP_CREATE: // (cap)
case EVENT_CAP_DELETE: // (cap) case EVENT_CAP_DELETE: // (cap)
case EVENT_CAP_ENABLE: // (cap) case EVENT_CAP_ENABLE: // (cap)
...@@ -1022,18 +1020,6 @@ void postCapMsg(Capability *cap, char *msg, va_list ap) ...@@ -1022,18 +1020,6 @@ void postCapMsg(Capability *cap, char *msg, va_list ap)
postLogMsg(&capEventBuf[cap->no], EVENT_LOG_MSG, msg, 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) void postUserEvent(Capability *cap, EventTypeNum type, char *msg)
{ {
EventsBuf *eb; EventsBuf *eb;
......
...@@ -49,8 +49,6 @@ void postUserEvent(Capability *cap, EventTypeNum type, char *msg); ...@@ -49,8 +49,6 @@ void postUserEvent(Capability *cap, EventTypeNum type, char *msg);
void postCapMsg(Capability *cap, char *msg, va_list ap); 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) * Post an event relating to a capability itself (create/delete/etc)
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment