diff options
author | Jiri Olsa <jolsa@kernel.org> | 2017-07-03 17:50:18 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-07-19 05:14:15 +0300 |
commit | 10213e2ff2e0453324689eb50e73df3df1ee6163 (patch) | |
tree | a4da3052e20c45c388c07a6f69a0600dd096b350 /tools/perf/util/evsel.c | |
parent | d78ada4a767a744cad5efa210b8acf57748b91d7 (diff) | |
download | linux-10213e2ff2e0453324689eb50e73df3df1ee6163.tar.xz |
perf tests attr: Add test_attr__ready function
We create many test events before the real ones just to test specific
features. But there's no way for attr tests to separate those test
events from those it needs to check.
Adding 'ready' call from the events open interface to trigger/start
events collection for attr test.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20170703145030.12903-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index df567e478a0e..6dd069a41ac3 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -58,6 +58,8 @@ static int perf_evsel__no_extra_init(struct perf_evsel *evsel __maybe_unused) return 0; } +void __weak test_attr__ready(void) { } + static void perf_evsel__no_extra_fini(struct perf_evsel *evsel __maybe_unused) { } @@ -1572,6 +1574,8 @@ retry_open: pr_debug2("sys_perf_event_open: pid %d cpu %d group_fd %d flags %#lx", pid, cpus->map[cpu], group_fd, flags); + test_attr__ready(); + fd = sys_perf_event_open(&evsel->attr, pid, cpus->map[cpu], group_fd, flags); |