From: tip-bot for Adrian Hunter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
adrian.hunter@intel.com, tglx@linutronix.de, jolsa@redhat.com,
acme@redhat.com, hpa@zytor.com
Subject: [tip:perf/core] perf auxtrace: Fix 'instructions' period of zero
Date: Tue, 29 Sep 2015 01:41:29 -0700 [thread overview]
Message-ID: <tip-e1791347b5d57d13326cf0114df1a3f3b1c4ca24@git.kernel.org> (raw)
In-Reply-To: <1443186956-18718-2-git-send-email-adrian.hunter@intel.com>
Commit-ID: e1791347b5d57d13326cf0114df1a3f3b1c4ca24
Gitweb: http://git.kernel.org/tip/e1791347b5d57d13326cf0114df1a3f3b1c4ca24
Author: Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Fri, 25 Sep 2015 16:15:32 +0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 28 Sep 2015 15:50:56 -0300
perf auxtrace: Fix 'instructions' period of zero
Instruction tracing options (i.e. --itrace) include an option for
sampling instructions at an arbitrary period. e.g.
--itrace=i10us
means make an 'instructions' sample for every 10us of trace.
Currently the logic does not distinguish between a period of
zero and no period being specified at all, so it gets treated
as the default period which is 100000. That doesn't really
make sense.
Fix it so that zero period is accepted and treated as meaning
"as often as possible".
In the case of Intel PT that is the same as a period of 1 and
a unit of 'instructions' (i.e. --itrace=i1i).
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-2-git-send-email-adrian.hunter@intel.com
[ Add a few lines describing this in the Documentation/intel-pt.txt file ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/intel-pt.txt | 5 +++++
tools/perf/util/auxtrace.c | 4 +++-
tools/perf/util/intel-pt.c | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Documentation/intel-pt.txt b/tools/perf/Documentation/intel-pt.txt
index c94c9de..886612b 100644
--- a/tools/perf/Documentation/intel-pt.txt
+++ b/tools/perf/Documentation/intel-pt.txt
@@ -707,6 +707,11 @@ on the sample is *not* adjusted and reflects the last known value of TSC.
For Intel PT, the default period is 100us.
+Setting it to a zero period means "as often as possible".
+
+In the case of Intel PT that is the same as a period of 1 and a unit of
+'instructions' (i.e. --itrace=i1i).
+
Also the call chain size (default 16, max. 1024) for instructions or
transactions events can be specified. e.g.
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index a980e7c..c4993b2 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -950,6 +950,7 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
const char *p;
char *endptr;
bool period_type_set = false;
+ bool period_set = false;
synth_opts->set = true;
@@ -971,6 +972,7 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
p += 1;
if (isdigit(*p)) {
synth_opts->period = strtoull(p, &endptr, 10);
+ period_set = true;
p = endptr;
while (*p == ' ' || *p == ',')
p += 1;
@@ -1053,7 +1055,7 @@ out:
if (!period_type_set)
synth_opts->period_type =
PERF_ITRACE_DEFAULT_PERIOD_TYPE;
- if (!synth_opts->period)
+ if (!period_set)
synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD;
}
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 38942e1..c8bb5ca 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -720,7 +720,7 @@ static struct intel_pt_queue *intel_pt_alloc_queue(struct intel_pt *pt,
if (!params.period) {
params.period_type = INTEL_PT_PERIOD_INSTRUCTIONS;
- params.period = 1000;
+ params.period = 1;
}
}
next prev parent reply other threads:[~2015-09-29 8:52 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 13:15 [PATCH 00/25] perf tools: minor improvements to Intel PT related stuff Adrian Hunter
2015-09-25 13:15 ` [PATCH 01/25] perf auxtrace: Fix 'instructions' period of zero Adrian Hunter
2015-09-28 14:12 ` Arnaldo Carvalho de Melo
2015-09-28 14:16 ` Arnaldo Carvalho de Melo
2015-09-29 8:41 ` tip-bot for Adrian Hunter [this message]
2015-09-25 13:15 ` [PATCH 02/25] perf report: Fix sample type validation for synthesized callchains Adrian Hunter
2015-09-29 8:41 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 03/25] perf intel-pt: Fix potential loop forever Adrian Hunter
2015-09-29 8:42 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 04/25] perf intel-pt: Make logging slightly more efficient Adrian Hunter
2015-09-29 8:42 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 05/25] perf script: Allow time to be displayed in nanoseconds Adrian Hunter
2015-09-29 8:42 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 06/25] perf tools: Warn when AUX data has been lost Adrian Hunter
2015-09-29 8:43 ` [tip:perf/core] perf session: " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 07/25] perf tools: Add more documentation to export-to-postgresql.py script Adrian Hunter
2015-09-29 8:43 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 08/25] perf auxtrace: Add option to synthesize branch stacks on samples Adrian Hunter
2015-09-29 8:43 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 09/25] perf report: Adjust sample type validation for synthesized branch stacks Adrian Hunter
2015-09-29 8:44 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 10/25] perf report: Also do default setup " Adrian Hunter
2015-09-29 8:44 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 11/25] perf report: Skip events with null " Adrian Hunter
2015-09-29 8:44 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 12/25] perf inject: Set branch stack feature flag when synthesizing " Adrian Hunter
2015-09-29 8:45 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 13/25] perf intel-pt: Move branch filter logic Adrian Hunter
2015-09-29 8:45 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 14/25] perf intel-pt: Support generating branch stack Adrian Hunter
2015-09-29 8:45 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 15/25] perf report: Make max_stack value allow for synthesized callchains Adrian Hunter
2015-09-28 20:03 ` Arnaldo Carvalho de Melo
2015-09-29 8:52 ` Adrian Hunter
2015-09-29 15:51 ` Arnaldo Carvalho de Melo
2015-09-30 8:43 ` Adrian Hunter
2015-09-30 13:17 ` Arnaldo Carvalho de Melo
2015-10-01 7:10 ` [tip:perf/core] perf report: Amend documentation about max_stack and " tip-bot for Adrian Hunter
2015-09-29 8:46 ` [tip:perf/core] perf report: Make max_stack value allow for " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 16/25] perf hists: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Adrian Hunter
2015-09-29 8:46 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 17/25] perf callchain: " Adrian Hunter
2015-09-28 20:08 ` Arnaldo Carvalho de Melo
2015-09-29 8:16 ` Adrian Hunter
2015-10-01 11:45 ` Adrian Hunter
2015-10-03 7:49 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 18/25] perf script: Add a setting for maximum stack depth Adrian Hunter
2015-09-29 8:46 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 19/25] perf scripting python: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Adrian Hunter
2015-09-29 8:47 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 20/25] perf script: Make scripting_max_stack value allow for synthesized callchains Adrian Hunter
2015-09-29 8:47 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 21/25] perf tools: Add perf_evlist__id2evsel_strict() Adrian Hunter
2015-09-29 8:47 ` [tip:perf/core] perf evlist: " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 22/25] perf tools: Add perf_evlist__del() Adrian Hunter
2015-09-28 13:33 ` Arnaldo Carvalho de Melo
2015-09-28 20:14 ` Arnaldo Carvalho de Melo
2015-09-29 8:48 ` [tip:perf/core] perf evlist: Add perf_evlist__remove() tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 23/25] perf inject: Remove more aux-related stuff when processing instruction traces Adrian Hunter
2015-09-29 8:48 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 24/25] perf inject: Add --strip option to strip out non-synthesized events Adrian Hunter
2015-09-29 8:49 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-25 13:15 ` [PATCH 25/25] perf intel-pt: Add mispred-all config option to aid use with autofdo Adrian Hunter
2015-09-29 8:49 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-09-28 20:33 ` [PATCH 00/25] perf tools: minor improvements to Intel PT related stuff Arnaldo Carvalho de Melo
2015-09-29 11:13 ` 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=tip-e1791347b5d57d13326cf0114df1a3f3b1c4ca24@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).