| 5 | | It is straight forward to extend the current implementation with additional probes, and due to the lightweight nature of DTrace, new probes could inspect the runtime system and running Haskell program even in a more fine-grained manner. |
| | 5 | It is straight forward to extend the current implementation with additional probes, and due to the lightweight nature of DTrace, new probes could inspect the runtime system and running Haskell program in an even more fine-grained manner. |
| | 6 | |
| | 7 | == Probes == |
| | 8 | |
| | 9 | The provider is defined as follows: |
| | 10 | {{{ |
| | 11 | provider HaskellEvent { |
| | 12 | |
| | 13 | // scheduler events |
| | 14 | probe create__thread (EventCapNo, EventThreadID); |
| | 15 | probe run__thread (EventCapNo, EventThreadID); |
| | 16 | probe stop__thread (EventCapNo, EventThreadID, EventThreadStatus); |
| | 17 | probe thread__runnable (EventCapNo, EventThreadID); |
| | 18 | probe migrate__thread (EventCapNo, EventThreadID, EventCapNo); |
| | 19 | probe run__spark (EventCapNo, EventThreadID); |
| | 20 | probe steal__spark (EventCapNo, EventThreadID, EventCapNo); |
| | 21 | probe shutdown (EventCapNo); |
| | 22 | probe thread_wakeup (EventCapNo, EventThreadID, EventCapNo); |
| | 23 | probe gc__start (EventCapNo); |
| | 24 | probe gc__end (EventCapNo); |
| | 25 | probe request__seq__gc (EventCapNo); |
| | 26 | probe request__par__gc (EventCapNo); |
| | 27 | probe create__spark__thread (EventCapNo, EventThreadID); |
| | 28 | |
| | 29 | // other events |
| | 30 | probe startup (EventCapNo); |
| | 31 | probe user__msg (EventCapNo, char *); |
| | 32 | probe gc__idle (EventCapNo); |
| | 33 | probe gc__work (EventCapNo); |
| | 34 | probe gc__done (EventCapNo); |
| | 35 | |
| | 36 | }; |
| | 37 | }}} |
| | 38 | where we have |
| | 39 | {{{ |
| | 40 | typedef uint32_t EventThreadID; |
| | 41 | typedef uint16_t EventCapNo; |
| | 42 | typedef uint16_t EventThreadStatus; |
| | 43 | }}} |
| | 44 | The two events `EVENT_LOG_MSG` and `EVENT_BLOCK_MARKER` are not supported. The former doesn't appear to be used and the latter appears to be an artefact of the event log file format. |