lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: perf: prctl(PR_TASK_PERF_EVENTS_DISABLE) has no effect
From
Date
On Fri, 2012-01-27 at 14:06 -0600, Andrew Steets wrote:
> On 1/27/12 11:12 AM, Peter Zijlstra wrote:
> > On Fri, 2012-01-27 at 11:03 -0600, Andrew Steets wrote:
> >> Can anyone tell
> >> me if I'm using this wrong or if this is a bug?
> >
> > You're using it wrong, it will disable events you own (created) not
> > events that monitor you.
>
> Is there an alternate way of disabling events that monitor the current
> process?

Nope, nor will there ever be.

> I ask because I came across the following description in
> tools/perf/design.txt:
>
> A process can enable or disable all the counter groups that are
> attached to it, using prctl:
>
> prctl(PR_TASK_PERF_EVENTS_ENABLE);
>
> prctl(PR_TASK_PERF_EVENTS_DISABLE);
>
> This applies to all counters on the current process, whether created
> by this process or by another, and doesn't affect any counters that
> this process has created on other processes. It only enables or
> disables the group leaders, not any other members in the groups.


That's wrong.. also I wouldn't ever allow such a 'feature', that's just
asking for trouble.


\
 
 \ /
  Last update: 2012-01-27 22:37    [W:0.087 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site