Commit a5c7f52e authored by Duncan Coutts's avatar Duncan Coutts

Sync EventLogFormat.h with ghc-events

parent 084b64f2
...@@ -140,20 +140,23 @@ ...@@ -140,20 +140,23 @@
#define EVENT_SPARK_STEAL 39 /* (victim_cap) */ #define EVENT_SPARK_STEAL 39 /* (victim_cap) */
#define EVENT_SPARK_FIZZLE 40 /* () */ #define EVENT_SPARK_FIZZLE 40 /* () */
#define EVENT_SPARK_GC 41 /* () */ #define EVENT_SPARK_GC 41 /* () */
#define EVENT_INTERN_STRING 42 /* (string, id) {not used by ghc} */
/* Range 42 - 59 is available for new events */ /* Range 43 - 59 is available for new GHC and common events */
/* Range 60 - 80 is used by eden for parallel tracing /* Range 60 - 80 is used by eden for parallel tracing
* see http://www.mathematik.uni-marburg.de/~eden/ * see http://www.mathematik.uni-marburg.de/~eden/
*/ */
/* Range 100 - 139 is reserved for Mercury */
/* /*
* The highest event code +1 that ghc itself emits. Note that some event * The highest event code +1 that ghc itself emits. Note that some event
* ranges higher than this are reserved but not currently emitted by ghc. * ranges higher than this are reserved but not currently emitted by ghc.
* This must match the size of the EventDesc[] array in EventLog.c * This must match the size of the EventDesc[] array in EventLog.c
*/ */
#define NUM_EVENT_TAGS 42 #define NUM_GHC_EVENT_TAGS 42
#if 0 /* DEPRECATED EVENTS: */ #if 0 /* DEPRECATED EVENTS: */
/* we don't actually need to record the thread, it's implicit */ /* we don't actually need to record the thread, it's implicit */
......
...@@ -101,7 +101,7 @@ typedef struct _EventType { ...@@ -101,7 +101,7 @@ typedef struct _EventType {
char *desc; // Description char *desc; // Description
} EventType; } EventType;
EventType eventTypes[NUM_EVENT_TAGS]; EventType eventTypes[NUM_GHC_EVENT_TAGS];
static void initEventsBuf(EventsBuf* eb, StgWord64 size, EventCapNo capno); static void initEventsBuf(EventsBuf* eb, StgWord64 size, EventCapNo capno);
static void resetEventsBuf(EventsBuf* eb); static void resetEventsBuf(EventsBuf* eb);
...@@ -200,7 +200,7 @@ initEventLogging(void) ...@@ -200,7 +200,7 @@ initEventLogging(void)
+ 10 /* .eventlog */, + 10 /* .eventlog */,
"initEventLogging"); "initEventLogging");
if (sizeof(EventDesc) / sizeof(char*) != NUM_EVENT_TAGS) { if (sizeof(EventDesc) / sizeof(char*) != NUM_GHC_EVENT_TAGS) {
barf("EventDesc array has the wrong number of elements"); barf("EventDesc array has the wrong number of elements");
} }
...@@ -250,7 +250,7 @@ initEventLogging(void) ...@@ -250,7 +250,7 @@ initEventLogging(void)
// Mark beginning of event types in the header. // Mark beginning of event types in the header.
postInt32(&eventBuf, EVENT_HET_BEGIN); postInt32(&eventBuf, EVENT_HET_BEGIN);
for (t = 0; t < NUM_EVENT_TAGS; ++t) { for (t = 0; t < NUM_GHC_EVENT_TAGS; ++t) {
eventTypes[t].etNum = t; eventTypes[t].etNum = t;
eventTypes[t].desc = EventDesc[t]; eventTypes[t].desc = EventDesc[t];
......
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