lkml.org 
[lkml]   [2014]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Adding a filter to events (instead of replacing one) was Re: [PATCH 1/2] perf, tools: Add PERF_PID
On Wed, Oct 01, 2014 at 03:03:16PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Sep 24, 2014 at 01:51:08PM -0700, Andi Kleen escreveu:
>
> > It's currently difficult to filter out perf itself using a filter.
> > This can give cascading effects during IO tracing when the IO perf
> > does itself causes more trace output.
>
> > The best way to filter is to use the pid. But it's difficult to get the pid
> > of perf without using hacks.
>
> > Add a PERF_PID meta variable to the perf filter that contains the current pid.
>
> > With this patch the following works
>
> > % perf record -e syscalls:sys_enter_write -a --filter 'common_pid != PERF_PID' ...
>
> So I tried this one now and saw the other patch, that applies the
> --filter to all events, while trying I got:

Patch seems reasonable to me.

However adding PERF_PID and sanitizing --filter are really two
different things and should probably not be mixed in a patch.

-Andi


\
 
 \ /
  Last update: 2014-10-02 00:41    [W:2.908 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site