diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-10-07 16:52:17 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-10-09 11:23:52 -0300 |
commit | 53c92f73389d049d72b2e1d1cbc81c007241d422 (patch) | |
tree | a7a21a337a5fcfdfdef5bec1288c63547ca6cb3a /tools/perf/util/evlist.h | |
parent | 05cea4492c9dd28439cc73de1047ab3b26033736 (diff) | |
download | linux-53c92f73389d049d72b2e1d1cbc81c007241d422.tar.gz linux-53c92f73389d049d72b2e1d1cbc81c007241d422.tar.bz2 linux-53c92f73389d049d72b2e1d1cbc81c007241d422.zip |
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>
Diffstat (limited to 'tools/perf/util/evlist.h')
-rw-r--r-- | tools/perf/util/evlist.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 00eab9435847..c58fd1908bfc 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -140,6 +140,8 @@ int perf_evlist__set_tp_filter(struct evlist *evlist, const char *filter); int perf_evlist__set_tp_filter_pid(struct evlist *evlist, pid_t pid); int perf_evlist__set_tp_filter_pids(struct evlist *evlist, size_t npids, pid_t *pids); +int perf_evlist__append_tp_filter(struct evlist *evlist, const char *filter); + struct evsel * perf_evlist__find_tracepoint_by_id(struct evlist *evlist, int id); |