Re: [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches

From: Pawel Moll
Date: Fri Jun 12 2015 - 09:28:42 EST


On Fri, 2015-06-12 at 14:15 +0100, Adrian Hunter wrote:
> >>>> all 3 are already part of sample_id.
> >>>
> >>> You have to decide whether you expect to be able to use an event without
> >>> sample_id. MMAP and MMAP2 both have pid, tid which are in sample_id, LOST
> >>> has id, EXIT and FORK have time, all of the THROTTLE/UNTHROTTLE members are
> >>> in sample_id etc. So it currently looks like we expect to be able to use an
> >>> event without requiring sample_id.
> >
> > The fact that there is this duplication is because sample_id_all came
> > after those events, but this new one being proposed doesn't have to do
> > it :-)
>
> Thanks, that's clear then. There will just need to be a flag to indicate
> whether it is scheduling in or out.

Just a thought: wouldn't it be good to know what CPU have we been
scheduled from/to? This kind of information would be especially valuable
in heterogeneous systems.

Pawel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/