On 6/12/15 4:34 AM, Adrian Hunter wrote:
On 12/06/15 03:47, David Ahern wrote:
On 6/11/15 8:15 AM, Peter Zijlstra wrote:
This new PERF_RECORD_SWITCH event does not have those problems
and it also has a couple of other small advantages. It is
easier to use because it is an auxiliary event (like mmap,
comm and task events) which can be enabled by setting a single
bit. It is smaller than sched:sched_switch and easier to parse.
Right, so the one wee problem I have is that this only provides sched_in
data, I imagine people might be interested in sched_out as well.
Yes and with the option of collecting callchains for sched_out.
So what do you want that is different different from
PERF_COUNT_SW_CONTEXT_SWITCHES? And why?
My 'perf sched timehist' command can use either sched_switch and context
switches. As you have pointed out you need to collect them system wide even if
you only care about a subset of tasks. If you are going to add a sched_in
there is good symmetry by also having a sched_out that is used and generated
in a consistent manner.