perf evlist: Introduce append_tp_filter() method
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 7 Oct 2019 19:52:17 +0000 (16:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 9 Oct 2019 14:23:52 +0000 (11:23 -0300)
commit53c92f73389d049d72b2e1d1cbc81c007241d422
treea7a21a337a5fcfdfdef5bec1288c63547ca6cb3a
parent05cea4492c9dd28439cc73de1047ab3b26033736
perf evlist: Introduce append_tp_filter() method

Will be used by 'perf trace' to support 'perf trace --filter', we need
to append to any pre-existing filter.

When parse_filter() gets invoked to process --filter, it'll set the
filter to that specified on the command line, later on, when we filter
out 'perf trace' own pid to avoid an event feedback loop, we need to
preserve the command line filter put in place by parse_filter().

Cc: Adrian Hunter <adrian.hunter@intel.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-h9rot08qmxlnfmte0holt68x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c
tools/perf/util/evlist.h