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;
26 * typedef uint32_t EventCapsetID;
27 * typedef uint16_t EventCapsetType; // types for EVENT_CAPSET_CREATE
30 /* -----------------------------------------------------------------------------
31 * The HaskellEvent provider captures everything from eventlog for use with
33 * -----------------------------------------------------------------------------
36 /* These probes correspond to the events defined in EventLogFormat.h
38 provider HaskellEvent {
40 /* scheduler events */
41 probe create__thread (EventCapNo, EventThreadID);
42 probe run__thread (EventCapNo, EventThreadID);
43 probe stop__thread (EventCapNo, EventThreadID, EventThreadStatus, EventThreadID);
44 probe thread__runnable (EventCapNo, EventThreadID);
45 probe migrate__thread (EventCapNo, EventThreadID, EventCapNo);
46 probe run__spark (EventCapNo, EventThreadID);
47 probe steal__spark (EventCapNo, EventThreadID, EventCapNo);
48 probe shutdown (EventCapNo);
49 probe thread_wakeup (EventCapNo, EventThreadID, EventCapNo);
50 probe gc__start (EventCapNo);
51 probe gc__end (EventCapNo);
52 probe request__seq__gc (EventCapNo);
53 probe request__par__gc (EventCapNo);
54 probe create__spark__thread (EventCapNo, EventThreadID);
57 /* This one doesn't seem to be used at all at the moment: */
58 /* probe log__msg (char *); */
59 probe startup (EventCapNo);
60 /* we don't need EVENT_BLOCK_MARKER with dtrace */
61 probe user__msg (EventCapNo, char *);
62 probe gc__idle (EventCapNo);
63 probe gc__work (EventCapNo);
64 probe gc__done (EventCapNo);
65 probe capset__create(EventCapsetID, EventCapsetType);
66 probe capset__delete(EventCapsetID);
67 probe capset__assign__cap(EventCapsetID, EventCapNo);
68 probe capset__remove__cap(EventCapsetID, EventCapNo);