aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2020-04-29 18:07:47 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-05-05 16:35:29 -0300
commit6cd2cbfc6865589c64ac37ec48937e93725622f1 (patch)
treea2cfc23c8b8a61cb7d5dee2becd61e89eebd678c /tools/perf/util/session.c
parentperf auxtrace: Add option to synthesize branch stack for regular events (diff)
downloadlinux-dev-6cd2cbfc6865589c64ac37ec48937e93725622f1.tar.xz
linux-dev-6cd2cbfc6865589c64ac37ec48937e93725622f1.zip
perf evsel: Add support for synthesized branch stack sample type
Allow for a synthesized branch stack to be added to samples. As with synthesized call chains, the sample type cannot be changed because it is needed to continue to parse events. So add and use helper function evsel__has_br_stack() to indicate a branch stack, whether original or synthesized. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20200429150751.12570-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 0b0bfe5bef17..2b5a08a92ce5 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1243,7 +1243,7 @@ static void dump_sample(struct evsel *evsel, union perf_event *event,
if (evsel__has_callchain(evsel))
callchain__printf(evsel, sample);
- if (sample_type & PERF_SAMPLE_BRANCH_STACK)
+ if (evsel__has_br_stack(evsel))
branch_stack__printf(sample, perf_evsel__has_branch_callstack(evsel));
if (sample_type & PERF_SAMPLE_REGS_USER)