#ifdef EVENTLOG
+#include "PosixSource.h"
#include "Rts.h"
+
#include "EventLog.h"
#include "Capability.h"
#include "Trace.h"
#include "RtsUtils.h"
#include "Stats.h"
+
#include <string.h>
#include <stdio.h>
EventsBuf *eventsBuf;
char *EventDesc[] = {
- "Create thread",
- "Run thread",
- "Stop thread",
- "Thread runnable",
- "Migrate thread",
- "Run spark",
- "Steal spark",
- "Shutdown",
- "Wakeup thread",
- "Starting GC",
- "Finished GC",
- "Request sequential GC",
- "Request parallel GC",
- "Create spark",
- "Spark to thread", /* DEPRECATED! */
- "Create spark thread"
+ [EVENT_CREATE_THREAD] = "Create thread",
+ [EVENT_RUN_THREAD] = "Run thread",
+ [EVENT_STOP_THREAD] = "Stop thread",
+ [EVENT_THREAD_RUNNABLE] = "Thread runnable",
+ [EVENT_MIGRATE_THREAD] = "Migrate thread",
+ [EVENT_RUN_SPARK] = "Run spark",
+ [EVENT_STEAL_SPARK] = "Steal spark",
+ [EVENT_SHUTDOWN] = "Shutdown",
+ [EVENT_THREAD_WAKEUP] = "Wakeup thread",
+ [EVENT_GC_START] = "Starting GC",
+ [EVENT_GC_END] = "Finished GC",
+ [EVENT_REQUEST_SEQ_GC] = "Request sequential GC",
+ [EVENT_REQUEST_PAR_GC] = "Request parallel GC",
+ [EVENT_CREATE_SPARK] = "Create spark",
+ [EVENT_SPARK_TO_THREAD] = "Spark to thread", /* DEPRECATED! */
+ [EVENT_CREATE_SPARK_THREAD] = "Create spark thread"
};
// Event type.
debugTrace(DEBUG_eventlog, "intiEventLog: start");
- event_log_filename = stgMallocBytes(strlen(prog_name) + 9,
+ event_log_filename = stgMallocBytes(strlen(prog_name) + 10,
"initEventLogging");
if (sizeof(EventDesc) / sizeof(char*) != NUM_EVENT_TAGS) {
void initEventsBuf(EventsBuf* eb, StgWord64 size)
{
- eb->begin = eb->pos = malloc(size);
+ eb->begin = eb->pos = stgMallocBytes(size, "initEventsBuf");
eb->size = size;
}