1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 2009
5 * User-space dtrace probes for the runtime system.
7 * ---------------------------------------------------------------------------*/
10 #include "rts/EventLogFormat.h"
13 /* -----------------------------------------------------------------------------
14 * Payload datatypes for Haskell events
15 * -----------------------------------------------------------------------------
18 /* We effectively have:
20 * typedef uint16_t EventTypeNum;
21 * typedef uint64_t EventTimestamp; // in nanoseconds
22 * typedef uint32_t EventThreadID;
23 * typedef uint16_t EventCapNo;
24 * typedef uint16_t EventPayloadSize; // variable-size events
25 * typedef uint16_t EventThreadStatus;
28 /* -----------------------------------------------------------------------------
29 * The HaskellEvent provider captures everything from eventlog for use with
31 * -----------------------------------------------------------------------------
34 /* These probes correspond to the events defined in EventLogFormat.h
36 provider HaskellEvent {
38 /* scheduler events */
39 probe create__thread (EventCapNo, EventThreadID);
40 probe run__thread (EventCapNo, EventThreadID);
41 probe stop__thread (EventCapNo, EventThreadID, EventThreadStatus, EventThreadID);
42 probe thread__runnable (EventCapNo, EventThreadID);
43 probe migrate__thread (EventCapNo, EventThreadID, EventCapNo);
44 probe run__spark (EventCapNo, EventThreadID);
45 probe steal__spark (EventCapNo, EventThreadID, EventCapNo);
46 probe shutdown (EventCapNo);
47 probe thread_wakeup (EventCapNo, EventThreadID, EventCapNo);
48 probe gc__start (EventCapNo);
49 probe gc__end (EventCapNo);
50 probe request__seq__gc (EventCapNo);
51 probe request__par__gc (EventCapNo);
52 probe create__spark__thread (EventCapNo, EventThreadID);
55 /* This one doesn't seem to be used at all at the moment: */
56 /* probe log__msg (char *); */
57 probe startup (EventCapNo);
58 /* we don't need EVENT_BLOCK_MARKER with dtrace */
59 probe user__msg (EventCapNo, char *);
60 probe gc__idle (EventCapNo);
61 probe gc__work (EventCapNo);
62 probe gc__done (EventCapNo);