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 // -----------------------------------------------------------------------------
17 // We effectively have:
19 // typedef uint16_t EventTypeNum;
20 // typedef uint64_t EventTimestamp; // in nanoseconds
21 // typedef uint32_t EventThreadID;
22 // typedef uint16_t EventCapNo;
23 // typedef uint16_t EventPayloadSize; // variable-size events
24 // typedef uint16_t EventThreadStatus;
27 // -----------------------------------------------------------------------------
28 // The HaskellEvent provider captures everything from eventlog for use with
30 // -----------------------------------------------------------------------------
32 // These probes correspond to the events defined in EventLogFormat.h
34 provider HaskellEvent {
37 probe create__thread (EventCapNo, EventThreadID);
38 probe run__thread (EventCapNo, EventThreadID);
39 probe stop__thread (EventCapNo, EventThreadID, EventThreadStatus);
40 probe thread__runnable (EventCapNo, EventThreadID);
41 probe migrate__thread (EventCapNo, EventThreadID, EventCapNo);
42 probe run__spark (EventCapNo, EventThreadID);
43 probe steal__spark (EventCapNo, EventThreadID, EventCapNo);
44 probe shutdown (EventCapNo);
45 probe thread_wakeup (EventCapNo, EventThreadID, EventCapNo);
46 probe gc__start (EventCapNo);
47 probe gc__end (EventCapNo);
48 probe request__seq__gc (EventCapNo);
49 probe request__par__gc (EventCapNo);
50 probe create__spark__thread (EventCapNo, EventThreadID);
53 //This one doesn't seem to be used at all at the moment:
54 // probe log__msg (char *);
55 probe startup (EventCapNo);
56 // we don't need EVENT_BLOCK_MARKER with dtrace
57 probe user__msg (EventCapNo, char *);
58 probe gc__idle (EventCapNo);
59 probe gc__work (EventCapNo);
60 probe gc__done (EventCapNo);