From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH V5 13/16] perf tools: Intel PT to always update thread stack trace number
Date: Fri, 22 May 2015 14:54:10 +0300 [thread overview]
Message-ID: <1432295653-13989-14-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1432295653-13989-1-git-send-email-adrian.hunter@intel.com>
The enhanced thread stack is used by higher layers but still
requires the trace number. The trace number is used to
distinguish discontinuous sections of trace (for example
from Snapshot mode or Sample mode), which cause the thread
stack to be flushed.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/intel-pt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 9c25bfa..5a59fd8 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -265,7 +265,7 @@ static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
if (!old_buffer || ptq->pt->sampling_mode || (ptq->pt->snapshot_mode &&
!buffer->consecutive)) {
b->consecutive = false;
- b->trace_nr = buffer->buffer_nr;
+ b->trace_nr = buffer->buffer_nr + 1;
} else {
b->consecutive = true;
}
@@ -1075,6 +1075,8 @@ static int intel_pt_sample(struct intel_pt_queue *ptq)
thread_stack__event(ptq->thread, ptq->flags, state->from_ip,
state->to_ip, ptq->insn_len,
state->trace_nr);
+ else
+ thread_stack__set_trace_nr(ptq->thread, state->trace_nr);
if (pt->sample_branches) {
err = intel_pt_synth_branch_sample(ptq);
--
1.9.1
next prev parent reply other threads:[~2015-05-22 11:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 11:53 [PATCH V5 00/16] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing Adrian Hunter
2015-05-22 11:53 ` [PATCH V5 01/16] perf tools: Disallow PMU events intel_pt and intel_bts until there is support Adrian Hunter
2015-05-27 16:52 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-05-22 11:53 ` [PATCH V5 02/16] perf auxtrace: Add Intel PT as an AUX area tracing type Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 03/16] perf tools: Add Intel PT packet decoder Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 04/16] perf tools: Add Intel PT instruction decoder Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 05/16] perf tools: Add Intel PT log Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 06/16] perf tools: Add Intel PT decoder Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 07/16] perf tools: Add Intel PT support Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 08/16] perf tools: Take Intel PT into use Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 09/16] perf tools: Allow auxtrace data alignment Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 10/16] perf tools: Add Intel BTS support Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 11/16] perf tools: Output sample flags and insn_len from intel_pt Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 12/16] perf tools: Output sample flags and insn_len from intel_bts Adrian Hunter
2015-05-22 11:54 ` Adrian Hunter [this message]
2015-05-22 11:54 ` [PATCH V5 14/16] perf tools: Intel BTS to always update thread stack trace number Adrian Hunter
2015-05-22 11:54 ` [PATCH V5 15/16] perf tools: Add example call-graph script Adrian Hunter
2015-05-26 15:43 ` Arnaldo Carvalho de Melo
2015-05-22 11:54 ` [PATCH V5 16/16] perf tools: Put itrace options into an asciidoc include Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432295653-13989-14-git-send-email-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox