From: Andi Kleen <andi@firstfloor.org>
To: acme@kernel.org
Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH v1 3/5] perf, tools, script: Allow printing period for non freq mode groups
Date: Thu, 9 Nov 2017 06:55:26 -0800 [thread overview]
Message-ID: <20171109145528.23371-4-andi@firstfloor.org> (raw)
In-Reply-To: <20171109145528.23371-1-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
When using leader sampling the values of the not sampled but counted
events are shown by perf script in "period".
Currently printing period is only allowed when the main event
has a period, that is it is in frequency mode.
This implies that we cannot dump the values of counted events
when the leader event is not in frequency mode.
Just remove the check that the period must be set on all
events. It will just be printed as 0 instead if it's not
available.
This fixes the following:
$ perf record -c 100000 -e '{cycles,branches}:S'
$ perf script -F event,period
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/builtin-script.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 9092de0f7238..34d8b766e518 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -377,11 +377,6 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel,
PERF_OUTPUT_CPU, allow_user_set))
return -EINVAL;
- if (PRINT_FIELD(PERIOD) &&
- perf_evsel__check_stype(evsel, PERF_SAMPLE_PERIOD, "PERIOD",
- PERF_OUTPUT_PERIOD))
- return -EINVAL;
-
if (PRINT_FIELD(IREGS) &&
perf_evsel__check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS",
PERF_OUTPUT_IREGS))
--
2.13.6
next prev parent reply other threads:[~2017-11-09 14:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 14:55 Add fine grained sampled metrics for perf script Andi Kleen
2017-11-09 14:55 ` [PATCH v1 1/5] perf, tools: Document some missing perf.data headers Andi Kleen
2017-11-13 8:54 ` Jiri Olsa
2017-11-13 18:23 ` Arnaldo Carvalho de Melo
2017-11-18 8:28 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-11-09 14:55 ` [PATCH v1 2/5] perf, tools: Save event scaling factors in perf.data Andi Kleen
2017-11-13 9:02 ` Jiri Olsa
2017-11-09 14:55 ` Andi Kleen [this message]
2017-11-13 9:11 ` [PATCH v1 3/5] perf, tools, script: Allow printing period for non freq mode groups Jiri Olsa
2017-11-13 18:23 ` Arnaldo Carvalho de Melo
2017-11-18 8:29 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-11-09 14:55 ` [PATCH v1 4/5] perf, tools: Add fallback in perf_evsel__nr_cpus for no map Andi Kleen
2017-11-13 9:22 ` Jiri Olsa
2017-11-14 5:03 ` Andi Kleen
2017-11-09 14:55 ` [PATCH v1 5/5] perf, tools, script: Allow computing metrics in perf script Andi Kleen
2017-11-13 9:30 ` Jiri Olsa
2017-11-13 18:23 ` Arnaldo Carvalho de Melo
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=20171109145528.23371-4-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=jolsa@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.