From: "Pádraig Brady" <P@draigBrady.com>
To: Francis Moreau <francis.moro@gmail.com>
Cc: linux-perf-users@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: A shortcut to select generalized hw events
Date: Tue, 31 May 2011 16:21:55 +0100 [thread overview]
Message-ID: <4DE50793.8040607@draigBrady.com> (raw)
In-Reply-To: <4DDFAB2B.90107@draigBrady.com>
[-- Attachment #1: Type: text/plain, Size: 990 bytes --]
On 27/05/11 14:46, Pádraig Brady wrote:
> On 27/05/11 13:01, Francis Moreau wrote:
>> Hello,
>>
>> Is there a mean to select all counters of a certain type ?
>>
>> For example I'd like to select all generalized hw counter with
>> perf-stat, is this possible ?
>
> I was looking for that too.
> I didn't look too hard, but there was nothing obvious.
> It would be very useful for example, to print all hardware counters
> that are supported by the current system as you say.
> To do that, I'm using this perf-hw script:
>
> #!/bin/sh
> hw_events=$(
> for i in $(perf list | sed -n 's/\[Hardware.*event\]//; T; s/ OR .*//; p'); do
> perf stat -e $i true >/dev/null 2>&1 &&
> printf -- "-e %s \n" $i
> done | tr -d '\n'
> )
> perf stat $hw_events $*
I've also just noticed the -ddd option recently added with:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2cba3ffb
I've attached some more documentation which might be useful?
cheers,
Pádraig.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: perf-stat-ddd.diff --]
[-- Type: text/x-patch; name="perf-stat-ddd.diff", Size: 1916 bytes --]
From 50273f3c531b2111343326a22dd76a9c1d893338 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Tue, 31 May 2011 16:16:59 +0100
Subject: [PATCH] perf stat: better document the -d option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Document fully the -d option from commit 2cba3ffb
* Documentation/perf-stat.txt: Detail the -d option
* builtin-stat.c: Document that -d can be repeated
Signed-off-by: Pádraig Brady <P@draigBrady.com>
---
tools/perf/Documentation/perf-stat.txt | 6 ++++++
tools/perf/builtin-stat.c | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 918cc38..36a6a00 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -50,6 +50,12 @@ OPTIONS
--scale::
scale/normalize counter values
+-d::
+ print more detailed statistics - repeat for more
+ -d: detailed events, L1 and LLC data cache
+ -dd: more detailed events, dTLB and iTLB events
+ -ddd: very detailed events, adding prefetch events
+
-r::
--repeat=<n>::
repeat command and print average + stddev (max: 100)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index a9f0671..a99be46 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1044,7 +1044,7 @@ static const struct option options[] = {
OPT_BOOLEAN('n', "null", &null_run,
"null run - dont start any counters"),
OPT_INCR('d', "detailed", &detailed_run,
- "detailed run - start a lot of events"),
+ "detailed run - start a lot of events - repeat for more"),
OPT_BOOLEAN('S', "sync", &sync_run,
"call sync() before starting a run"),
OPT_CALLBACK_NOOPT('B', "big-num", NULL, NULL,
--
1.7.5.1
next prev parent reply other threads:[~2011-05-31 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 12:01 A shortcut to select generalized hw events Francis Moreau
2011-05-27 13:46 ` Pádraig Brady
2011-05-31 15:21 ` Pádraig Brady [this message]
2011-05-31 19:03 ` Francis Moreau
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=4DE50793.8040607@draigBrady.com \
--to=p@draigbrady.com \
--cc=francis.moro@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@elte.hu \
/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).