lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 9 Sep 2014 18:08:39 -0700
From:	Brendan Gregg <>
To:	Andi Kleen <>
Cc:	Jiri Olsa <>, LKML <>,
	Namhyung Kim <>,
	Arnaldo Carvalho de Melo <>,
	Ingo Molnar <>,,
	Andi Kleen <>
Subject: Re: [PATCH] perf, tools: Add PERF_PID

On Tue, Sep 9, 2014 at 5:03 PM, Andi Kleen <> wrote:
> From: Andi Kleen <>
> 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' ...
> This won't work for more complex perf pipe lines with multiple processes,
> but at least solves the problem nicely for a single perf.

Thank you, this will be handy. I tested it and it works.

It will mean I can avoid hacks like this:

I think it's unrelated to this patch, but the very next test I tried
didn't work as expected:

# perf record -e 'syscalls:sys_enter_*' --filter 'common_pid !=
PERF_PID' -a sleep 5

It only filters the last event from the wildcard expansion, leaving
write() unfiltered. Looks like it's because parse_filter() is only
setting the filter for perf_evlist__last(), instead of doing an
evlist__for_each(). How best to deal with this can be addressed in a
separate patch later.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists