summaryrefslogtreecommitdiff
path: root/rts/eventlog/EventLog.h
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2012-02-03 12:20:36 +0000
committerDuncan Coutts <duncan@well-typed.com>2012-04-04 19:10:44 +0100
commitf9c2e8543cabd6661eec17d5be31469455a64e05 (patch)
tree3275bbb0e2bbcd4d8bd003584d478c0ad1e4c107 /rts/eventlog/EventLog.h
parent4caef1c42dd5b6e4982e7f07162c9a7edc5a1b0b (diff)
downloadhaskell-f9c2e8543cabd6661eec17d5be31469455a64e05.tar.gz
Add eventlog/trace stuff for capabilities: create/delete/enable/disable
Now that we can adjust the number of capabilities on the fly, we need this reflected in the eventlog. Previously the eventlog had a single startup event that declared a static number of capabilities. Obviously that's no good anymore. For compatability we're keeping the EVENT_STARTUP but adding new EVENT_CAP_CREATE/DELETE. The EVENT_CAP_DELETE is actually just the old EVENT_SHUTDOWN but renamed and extended (using the existing mechanism to extend eventlog events in a compatible way). So we now emit both EVENT_STARTUP and EVENT_CAP_CREATE. One day we will drop EVENT_STARTUP. Since reducing the number of capabilities at runtime does not really delete them, it just disables them, then we also have new events for disable/enable. The old EVENT_SHUTDOWN was in the scheduler class of events. The new EVENT_CAP_* events are in the unconditional class, along with the EVENT_CAPSET_* ones. Knowing when capabilities are created and deleted is crucial to making sense of eventlogs, you always want those events. In any case, they're extremely low volume.
Diffstat (limited to 'rts/eventlog/EventLog.h')
-rw-r--r--rts/eventlog/EventLog.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/eventlog/EventLog.h b/rts/eventlog/EventLog.h
index 1858be8ecd..6a3b32dad3 100644
--- a/rts/eventlog/EventLog.h
+++ b/rts/eventlog/EventLog.h
@@ -49,6 +49,12 @@ 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)
+ */
+void postCapEvent (EventTypeNum tag,
+ EventCapNo capno);
+
+/*
* Post an event that is associated with a capability set
*/
void postCapsetEvent (EventTypeNum tag,