perf trace: Filter own pid to avoid a feedback look in 'perf trace record -a'
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 14 Oct 2019 23:13:51 +0000 (20:13 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Oct 2019 16:03:57 +0000 (13:03 -0300)
commit7fbfe22cf4cfe01a88704dd76ca65d108039d297
tree579b8171c79af2539a10f2258005c7a4b35966b0
parentda949f507a73df5b5ad5031cb23b82a4d81846eb
perf trace: Filter own pid to avoid a feedback look in 'perf trace record -a'

When doing a system wide 'perf trace record' we need, just like in 'perf
trace' live mode, to filter out perf trace's own pid, so set up a
tracepoint filter for the raw_syscalls tracepoints right after adding
them to the argv array that is set up to then call cmd_record().

Reported-by: Andi Kleen <ak@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-uysx5w8f2y5ndoln5cq370tv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c