From: Namhyung Kim <namhyung@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: jolsa@redhat.com, linux-kernel@vger.kernel.org,
acme@infradead.org, Andi Kleen <ak@linux.intel.com>,
fweisbec@gmail.com
Subject: Re: [PATCH 9/9] perf, tools, record: Always allow to overide default period v2
Date: Thu, 05 Jun 2014 00:33:07 +0900 [thread overview]
Message-ID: <1401895987.1673.36.camel@leonhard> (raw)
In-Reply-To: <1401486615-21374-10-git-send-email-andi@firstfloor.org>
Hi Andi,
2014-05-30 (금), 14:50 -0700, Andi Kleen:
> 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)
Are you sure you tested all cases after this patch applied?
When I apply it, it doesn't record any samples..
$ perf record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.309 MB perf.data
(~13494 samples) ]
$ perf report --stdio
Error:
The perf.data file has no samples!
# To display the perf.data header info,
# please use --header/--header-only options.
$ perf evlist -F
cycles: sample_freq=0
Thanks,
Namhyung
>
> 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);
next prev parent reply other threads:[~2014-06-04 15:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 21:50 perf: Add support for full Intel event lists v5 Andi Kleen
2014-05-30 21:50 ` [PATCH 1/9] perf, tools: Add jsmn `jasmine' JSON parser v2 Andi Kleen
2014-05-30 21:50 ` [PATCH 2/9] perf, tools: Add support for text descriptions of events and alias add Andi Kleen
2014-06-09 4:57 ` Namhyung Kim
2014-06-09 16:52 ` Andi Kleen
2014-06-10 5:58 ` Namhyung Kim
2014-05-30 21:50 ` [PATCH 3/9] perf, tools: Add support for reading JSON event files v3 Andi Kleen
2014-05-30 21:50 ` [PATCH 4/9] perf, tools: Automatically look for event file name for cpu v2 Andi Kleen
2014-05-30 21:50 ` [PATCH 5/9] perf, tools: Add perf download to download event files v3 Andi Kleen
2014-05-30 21:50 ` [PATCH 6/9] perf, tools: Allow events with dot Andi Kleen
2014-05-30 21:50 ` [PATCH 7/9] perf, tools: Query terminal width and use in perf list Andi Kleen
2014-05-30 21:50 ` [PATCH 8/9] perf, tools, test: Add test case for alias and JSON parsing v2 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 [this message]
2014-06-04 16:59 ` Andi Kleen
2014-06-09 5:21 ` Namhyung Kim
2014-06-09 5:56 ` perf: Add support for full Intel event lists v5 Namhyung Kim
2014-06-09 18:01 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2014-05-15 22:03 perf: Add support for full Intel event lists v4 Andi Kleen
2014-05-15 22:03 ` [PATCH 9/9] perf, tools, record: Always allow to overide default period v2 Andi Kleen
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=1401895987.1673.36.camel@leonhard \
--to=namhyung@kernel.org \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--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
Powered by JetHome