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 #include "BeginPrivate.h"
20 * Descriptions of EventTags for events.
22 extern char *EventTagDesc[];
24 void initEventLogging(void);
25 void endEventLogging(void);
26 void freeEventLogging(void);
27 void abortEventLogging(void); // #4512 - after fork child needs to abort
28 void flushEventLog(void); // event log inherited from parent
31 * Post a scheduler event to the capability's event buffer (an event
32 * that has an associated thread).
34 void postSchedEvent(Capability *cap, EventTypeNum tag,
35 StgThreadID id, StgWord info1, StgWord info2);
38 * Post a nullary event.
40 void postEvent(Capability *cap, EventTypeNum tag);
42 void postMsg(char *msg, va_list ap);
44 void postUserMsg(Capability *cap, char *msg, va_list ap);
46 void postCapMsg(Capability *cap, char *msg, va_list ap);
48 void postEventStartup(EventCapNo n_caps);
51 * Post a capability set modification event
53 void postCapsetModifyEvent (EventTypeNum tag,
58 * Post a capability set event with a string payload
60 void postCapsetStrEvent (EventTypeNum tag,
65 * Post a capability set event with several strings payload
67 void postCapsetVecEvent (EventTypeNum tag,
74 INLINE_HEADER void postSchedEvent (Capability *cap STG_UNUSED,
75 EventTypeNum tag STG_UNUSED,
76 StgThreadID id STG_UNUSED,
77 StgWord info1 STG_UNUSED,
78 StgWord info2 STG_UNUSED)
81 INLINE_HEADER void postEvent (Capability *cap STG_UNUSED,
82 EventTypeNum tag STG_UNUSED)
85 INLINE_HEADER void postMsg (char *msg STG_UNUSED,
86 va_list ap STG_UNUSED)
89 INLINE_HEADER void postCapMsg (Capability *cap STG_UNUSED,
91 va_list ap STG_UNUSED)
96 #include "EndPrivate.h"
98 #endif /* TRACING_H */