1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 2008-2009
5 * Support for fast binary event logging.
7 * ---------------------------------------------------------------------------*/
12 #include "rts/EventLogFormat.h"
13 #include "Capability.h"
15 #pragma GCC visibility push(hidden)
20 * Descriptions of EventTags for events.
22 extern char *EventTagDesc[];
24 void initEventLogging(void);
25 void endEventLogging(void);
26 void freeEventLogging(void);
28 void postEvent_(Capability *cap, EventTypeNum tag, StgThreadID id, StgWord64 other);
31 * Post an event to the capability's event buffer.
33 INLINE_HEADER void postEvent(Capability *cap, EventTypeNum tag, StgThreadID id, StgWord64 other)
35 if (RtsFlags.EventLogFlags.doEventLogging) {
36 postEvent_(cap, tag, id, other);
40 void printAndClearEventLog(Capability *cap);
44 INLINE_HEADER void postEvent(Capability *cap STG_UNUSED,
45 EventTypeNum tag STG_UNUSED,
46 StgThreadID id STG_UNUSED,
47 StgWord64 other STG_UNUSED)
54 #pragma GCC visibility pop
56 #endif /* EVENTLOG_H */