From: Andi Kleen <andi@firstfloor.org>
To: jolsa@redhat.com
Cc: linux-kernel@vger.kernel.org, namhyung@kernel.org,
acme@infradead.org, Andi Kleen <ak@linux.intel.com>,
fweisbec@gmail.com
Subject: [PATCH 9/9] perf, tools, record: Always allow to overide default period v2
Date: Thu, 15 May 2014 15:03:12 -0700 [thread overview]
Message-ID: <1400191392-11569-10-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1400191392-11569-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
Fix the logic to allow overriding event default periods with -c or -F
on the command line. I'm not sure I understand this if() fully, but
this change makes all cases I tested work (tracepoint with default, default,
,-c, -F)
This fixed specifying -c / -F with json event list events,
which have a default period. It should do the same
for trace point events.
Cc: fweisbec@gmail.com
v2: Simplify, just change || to &&
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/util/evsel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 5c28d82..d9ceede 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -592,7 +592,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
* We default some events to a 1 default interval. But keep
* it a weak assumption overridable by the user.
*/
- if (!attr->sample_period || (opts->user_freq != UINT_MAX &&
+ if (!attr->sample_period && (opts->user_freq != UINT_MAX &&
opts->user_interval != ULLONG_MAX)) {
if (opts->freq) {
perf_evsel__set_sample_bit(evsel, PERIOD);
--
1.9.0
next prev parent reply other threads:[~2014-05-15 22:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 22:03 perf: Add support for full Intel event lists v4 Andi Kleen
2014-05-15 22:03 ` [PATCH 1/9] perf, tools: Add jsmn `jasmine' JSON parser v2 Andi Kleen
2014-05-15 22:03 ` [PATCH 2/9] perf, tools: Add support for text descriptions of events and alias add Andi Kleen
2014-05-15 22:03 ` [PATCH 3/9] perf, tools: Add support for reading JSON event files v2 Andi Kleen
2014-05-15 22:03 ` [PATCH 4/9] perf, tools: Automatically look for event file name for cpu v2 Andi Kleen
2014-05-15 22:03 ` [PATCH 5/9] perf, tools: Add perf download to download event files v3 Andi Kleen
2014-05-15 22:03 ` [PATCH 6/9] perf, tools: Allow events with dot Andi Kleen
2014-05-15 22:03 ` [PATCH 7/9] perf, tools: Query terminal width and use in perf list Andi Kleen
2014-05-15 22:03 ` [PATCH 8/9] perf, tools, test: Add test case for alias and JSON parsing v2 Andi Kleen
2014-05-15 22:03 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-30 21:50 perf: Add support for full Intel event lists v5 Andi Kleen
2014-05-30 21:50 ` [PATCH 9/9] perf, tools, record: Always allow to overide default period v2 Andi Kleen
2014-06-04 15:33 ` Namhyung Kim
2014-06-04 16:59 ` Andi Kleen
2014-06-09 5:21 ` Namhyung Kim
2014-05-12 22:51 perf: Add support for full Intel event lists v3 Andi Kleen
2014-05-12 22:51 ` [PATCH 9/9] perf, tools, record: Always allow to overide default period v2 Andi Kleen
2014-05-14 5:50 ` Namhyung Kim
2014-05-15 20:51 ` Andi Kleen
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=1400191392-11569-10-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@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;
as well as URLs for NNTP newsgroup(s).