diff options
author | Ian Rogers <irogers@google.com> | 2020-05-08 19:08:03 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-05-28 15:03:25 +0200 |
commit | 5885a202d04482427bc4079981680b30e3e5bbab (patch) | |
tree | 64998278fcfaa13cde0bb405fc05b47bcea9e7ea /tools | |
parent | perf parse-events: Use strcmp() to compare the PMU name (diff) | |
download | linux-5885a202d04482427bc4079981680b30e3e5bbab.tar.xz linux-5885a202d04482427bc4079981680b30e3e5bbab.zip |
perf evsel: Dummy events never triggers, no need to ask for PERF_SAMPLE_BRANCH_STACK
A dummy event never triggers any actual counter and therefore cannot be
used with branch_stack
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200422173615.59436-1-irogers@google.com
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/evsel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 28683b0eb738..a2397ca4d57a 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1153,11 +1153,14 @@ void evsel__config(struct evsel *evsel, struct record_opts *opts, } /* + * A dummy event never triggers any actual counter and therefore + * cannot be used with branch_stack. + * * For initial_delay, a dummy event is added implicitly. * The software event will trigger -EOPNOTSUPP error out, * if BRANCH_STACK bit is set. */ - if (opts->initial_delay && is_dummy_event(evsel)) + if (is_dummy_event(evsel)) evsel__reset_sample_bit(evsel, BRANCH_STACK); } |