From: Peter Zijlstra <peterz@infradead.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Stephane Eranian <eranian@google.com>,
Andi Kleen <andi@firstfloor.org>,
Minchan Kim <minchan@kernel.org>
Subject: Re: [RFC/PATCH] perf stat: Show sample events stat for a data file
Date: Wed, 29 Apr 2015 11:27:51 +0200 [thread overview]
Message-ID: <20150429092751.GR5029@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1430292465-8863-1-git-send-email-namhyung@kernel.org>
On Wed, Apr 29, 2015 at 04:27:45PM +0900, Namhyung Kim wrote:
> Add --input option to 'perf stat' so that it can show event stats of the
> file. I would like to use a short '-i' option to be compatible with
> other commands but it was already taken by '--no-inherit' option, so it
> only supports the long option.
>
> The example output looks like below:
>
> $ perf record -a sleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.635 MB perf.data (1946 samples) ]
>
> $ perf stat --input perf.data
>
> Total event stats for 'perf.data' file:
>
> TOTAL events: 6837
> MMAP events: 116
> COMM events: 375
> EXIT events: 2
> THROTTLE events: 12
> UNTHROTTLE events: 11
> FORK events: 374
> SAMPLE events: 1946
> MMAP2 events: 3999
> FINISHED_ROUND events: 2
>
> Sample event stats:
>
> 361,255,234 cycles
> 1,946 samples # sampling ratio 12.162% (486/4000)
>
> 0.998581085 second time sampled
It would be nice if this thing could support 'perf record -s' which
enables perf_event_attr::inherit_stat, which in turn results in
PERF_RECORD_READ entries after every PERF_RECORD_EXIT which give the
total number of events for each recorded task.
next prev parent reply other threads:[~2015-04-29 9:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 7:27 [RFC/PATCH] perf stat: Show sample events stat for a data file Namhyung Kim
2015-04-29 7:42 ` Jiri Olsa
2015-04-29 7:58 ` Namhyung Kim
2015-04-29 9:27 ` Peter Zijlstra [this message]
2015-04-29 11:58 ` Namhyung Kim
2015-05-08 14:46 ` Peter Zijlstra
2015-05-09 14:39 ` Namhyung Kim
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=20150429092751.GR5029@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mingo@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