summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-07-09 19:08:26 -0500
committerAustin Seipp <austin@well-typed.com>2014-07-09 19:20:38 -0500
commitbd5f3ef6585640f762d96426bb041d79a5038e8e (patch)
tree3de7ab4954715f9086242e45e73ac01928225848
parenta77e07970a89f2101e3c4f0429c6f426f06f1faf (diff)
downloadhaskell-bd5f3ef6585640f762d96426bb041d79a5038e8e.tar.gz
rts: Fix #9003 with an annoying hack
The TL;DR is that by adding this, we can distinguish GHC 7.8.3 from 7.8.2, which had a buggy implementation. See the ticket for details. Signed-off-by: Austin Seipp <austin@well-typed.com>
-rw-r--r--includes/rts/EventLogFormat.h4
-rw-r--r--rts/eventlog/EventLog.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/includes/rts/EventLogFormat.h b/includes/rts/EventLogFormat.h
index e08a44996f..a1e038f823 100644
--- a/includes/rts/EventLogFormat.h
+++ b/includes/rts/EventLogFormat.h
@@ -162,6 +162,8 @@
#define EVENT_TASK_MIGRATE 56 /* (taskID, cap, new_cap) */
#define EVENT_TASK_DELETE 57 /* (taskID) */
#define EVENT_USER_MARKER 58 /* (marker_name) */
+#define EVENT_HACK_BUG_T9003 59 /* Hack: see trac #9003 */
+
/* Range 59 - 59 is available for new GHC and common events. */
/* Range 60 - 80 is used by eden for parallel tracing
@@ -177,7 +179,7 @@
* ranges higher than this are reserved but not currently emitted by ghc.
* This must match the size of the EventDesc[] array in EventLog.c
*/
-#define NUM_GHC_EVENT_TAGS 59
+#define NUM_GHC_EVENT_TAGS 60
#if 0 /* DEPRECATED EVENTS: */
/* we don't actually need to record the thread, it's implicit */
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index 2e0e9bbddc..4fd4b44d80 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -106,6 +106,7 @@ char *EventDesc[] = {
[EVENT_TASK_CREATE] = "Task create",
[EVENT_TASK_MIGRATE] = "Task migrate",
[EVENT_TASK_DELETE] = "Task delete",
+ [EVENT_HACK_BUG_T9003] = "Empty event for bug #9003",
};
// Event type.
@@ -420,6 +421,10 @@ initEventLogging(void)
sizeof(EventCapNo);
break;
+ case EVENT_HACK_BUG_T9003:
+ eventTypes[t].size = 0;
+ break;
+
default:
continue; /* ignore deprecated events */
}