summaryrefslogtreecommitdiff
path: root/rts/RtsProbes.d
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2012-07-03 19:28:40 +0100
committerMikolaj Konarski <mikolaj@well-typed.com>2012-07-10 17:53:34 +0200
commit54c98b687a5e23f3371604dc4918dfb3106a74f8 (patch)
tree6f35fbe69fec9f26d14da6f0a146aef5a4a925f1 /rts/RtsProbes.d
parent647ae1cfbb5ea3e2d3b1541c2bc12ea5db321134 (diff)
downloadhaskell-54c98b687a5e23f3371604dc4918dfb3106a74f8.tar.gz
Define the task-tracking events
Based on initial patches by Mikolaj Konarski <mikolaj@well-typed.com> These new eventlog events are to let profiling tools keep track of all the OS threads that belong to an RTS capability at any moment in time. In the RTS, OS threads correspond to the Task abstraction, so that is what we track. There are events for tasks being created, migrated between capabilities and deleted. In particular the task creation event also records the kernel thread id which lets us match up the OS thread with data collected by others tools (in the initial use case with Linux's perf tool, but in principle also with DTrace).
Diffstat (limited to 'rts/RtsProbes.d')
-rw-r--r--rts/RtsProbes.d5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/RtsProbes.d b/rts/RtsProbes.d
index 40665acc56..9be0e66a40 100644
--- a/rts/RtsProbes.d
+++ b/rts/RtsProbes.d
@@ -90,6 +90,11 @@ provider HaskellEvent {
probe spark__fizzle (EventCapNo);
probe spark__gc (EventCapNo);
+ /* task events */
+ probe task__create(EventTaskId, EventCapNo, EventKernelThreadId);
+ probe task__migrate(EventTaskId, EventCapNo, EventCapNo);
+ probe task__delete(EventTaskId);
+
/* other events */
/* This one doesn't seem to be used at all at the moment: */
/* probe log__msg (char *); */