projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
975846e
)
perf intel-pt: Add callchain to synthesized PEBS sample
author
Adrian Hunter
<adrian.hunter@intel.com>
Mon, 10 Jun 2019 07:28:03 +0000
(10:28 +0300)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Mon, 17 Jun 2019 18:57:18 +0000
(15:57 -0300)
Like other synthesized events, if there is also an Intel PT branch
trace, then a call stack can also be synthesized. Add that.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link:
http://lkml.kernel.org/r/20190610072803.10456-12-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/intel-pt.c
b/tools/perf/util/intel-pt.c
index
bf76478
..
550db6e
100644
(file)
--- a/
tools/perf/util/intel-pt.c
+++ b/
tools/perf/util/intel-pt.c
@@
-1730,6
+1730,14
@@
static int intel_pt_synth_pebs_sample(struct intel_pt_queue *ptq)
sample.time = tsc_to_perf_time(timestamp, &pt->tc);
}
+ if (sample_type & PERF_SAMPLE_CALLCHAIN &&
+ pt->synth_opts.callchain) {
+ thread_stack__sample(ptq->thread, ptq->cpu, ptq->chain,
+ pt->synth_opts.callchain_sz, sample.ip,
+ pt->kernel_start);
+ sample.callchain = ptq->chain;
+ }
+
if (sample_type & PERF_SAMPLE_REGS_INTR &&
items->mask[INTEL_PT_GP_REGS_POS]) {
u64 regs[sizeof(sample.intr_regs.mask)];