aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/intel-pt.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2020-04-29 18:07:43 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-05-05 16:35:29 -0300
commit86d67180b920d178ae1c2923f50a0759d6ce1a10 (patch)
tree79534f81a6c90f50bf7085b0ab3f27fc7d8582f3 /tools/perf/util/intel-pt.c
parentperf tools: Simplify checking if SMT is active. (diff)
downloadlinux-dev-86d67180b920d178ae1c2923f50a0759d6ce1a10.tar.xz
linux-dev-86d67180b920d178ae1c2923f50a0759d6ce1a10.zip
perf thread-stack: Add branch stack support
Intel PT already has support for creating branch stacks for each context (per-cpu or per-thread). In the more common per-cpu case, the branch stack is not separated for different threads, instead being cleared in between each sample. That approach will not work very well for adding branch stacks to regular events. The branch stacks really need to be accumulated separately for each thread. As a start to accomplishing that, this patch adds support for putting branch stack support into the thread-stack. The advantages are: 1. the branches are accumulated separately for each thread 2. the branch stack is cleared only in between continuous traces This helps pave the way for adding branch stacks to regular events, not just synthesized events as at present. 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-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/intel-pt.c')
-rw-r--r--tools/perf/util/intel-pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 30e1ee6d3e40..bdb84470f7d0 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -2033,7 +2033,7 @@ static int intel_pt_sample(struct intel_pt_queue *ptq)
pt->synth_opts.thread_stack)
thread_stack__event(ptq->thread, ptq->cpu, ptq->flags, state->from_ip,
state->to_ip, ptq->insn_len,
- state->trace_nr);
+ state->trace_nr, true, 0, 0);
else
thread_stack__set_trace_nr(ptq->thread, ptq->cpu, state->trace_nr);