cpudist: Use `finish_task_switch` kprobe instead of `sched_switch` tracepoint
authorSasha Goldshtein <goldshtn@gmail.com>
Thu, 30 Jun 2016 14:39:27 +0000 (07:39 -0700)
committerSasha Goldshtein <goldshtn@gmail.com>
Thu, 30 Jun 2016 14:39:27 +0000 (07:39 -0700)
commit06d90d3d4b35815027b7b7a7fc48167d497d2de3
treea66436019270a57955bcf24bc00eaf71cc5f21e1
parent3c976bbdcc2d83e81ab85448c20296c003a2307c
cpudist: Use `finish_task_switch` kprobe instead of `sched_switch` tracepoint

The `sched_switch` tracepoint approach requires storing the previous
task's tgid in a map and fetching it from there, because it is not
available as a tracepoint argument. Instead, placing a kprobe on the
`finish_task_switch` function allows cleanly fetching the previous
task's pid and tgid from the task_struct.
man/man8/cpudist.8
tools/cpudist.py