lkml.org 
[lkml]   [2015]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches
On Thu, Jun 11, 2015 at 09:34:30AM -0700, Andi Kleen wrote:
> On Thu, Jun 11, 2015 at 04:15:48PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 09, 2015 at 05:21:10PM +0300, Adrian Hunter wrote:
> > > Tracepoints are no good at all for non-privileged users
> > > because they need either CAP_SYS_ADMIN or
> > > /proc/sys/kernel/perf_event_paranoid <= -1.
> > >
> > > On the other hand, kernel software events need either
> > > CAP_SYS_ADMIN or /proc/sys/kernel/perf_event_paranoid <= 1.
> >
> > So while I think it makes sense to allow some tracepoint outside of that
> > priv level, IOW have a per tracepoint priv level filter thingy, I don't
> > think sched_switch() is one of those because it explicitly exposes
> > timing information on other tasks.
>
> It's trivial for a running program to measure when it gets context switched
> by looking at timing. I don't think this event provides anything new over that.

The _existing_ ones expose timing of _other_ tasks, the proposed one does
not.


\
 
 \ /
  Last update: 2015-06-11 19:21    [W:0.086 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site