From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>,
Anton Blanchard <anton@au1.ibm.com>,
linux-kernel@vger.kernel.org, eranian@google.com,
acme@redhat.com, linuxppc-dev@ozlabs.org, paulus@samba.org,
mpjohn@us.ibm.com, mingo@kernel.org, asharma@fb.com
Subject: Re: [RFC][PATCH] perf: Add a few generic stalled-cycles events
Date: Tue, 30 Oct 2012 23:40:56 -0700 [thread overview]
Message-ID: <20121031064056.GA12061@us.ibm.com> (raw)
In-Reply-To: <1351081662.22332.13.camel@twins>
Peter Zijlstra [peterz@infradead.org] wrote:
| On Tue, 2012-10-16 at 11:31 -0700, Sukadev Bhattiprolu wrote:
| > On a side note, how does the kernel on x86 use the 'config' information in
| > say /sys/bus/event_source/devices/cpu/format/cccr ? On Power7, the raw
| > code encodes the information such as the PMC to use for the event. Is that
| > how the 'config' info in Intel is used ?
| >
| > Does the 'config' info change from system to system or is it static for
| > a given event on a given CPU ?
|
| Have a look at commits (tip/master):
|
| 641cc938815dfd09f8fa1ec72deb814f0938ac33
| a47473939db20e3961b200eb00acf5fcf084d755
| 43c032febde48aabcf6d59f47cdcb7b5debbdc63
|
|
| So basically
|
| /sys/bus/event_source/devices/cpu/format/event
|
| contains something like:
|
| config:0-7
|
| Which says that for the 'cpu' PMU, field 'event' fills
| perf_event_attr::config bits 0 through 7 (for type=PERF_TYPE_RAW).
|
| The perf tool syntax for this is:
|
| perf stat -e 'cpu/event=0x3c/'
|
| This basically allows you to expose bitfields in the 'raw' event format
| for ease of writing raw events. I do not know if the Power PMU has such
| or not.
Thanks for the detailed explanation.
Power does not support this yet, but I have started working on it now.
BTW, does this mean that we can use arch-specific names for the sysfs entries
within:
/sys/bus/event_source/devices/cpu/events/
So instead of the names I came up with in this patch, stalled-cycles-fixed-point
we could use the name used in the CPU spec - 'cmplu_stall_fxu' in the arch
specific code ?
Sukadev
next prev parent reply other threads:[~2012-10-31 6:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 1:28 [RFC][PATCH] perf: Add a few generic stalled-cycles events Sukadev Bhattiprolu
2012-10-15 5:26 ` Anshuman Khandual
2012-10-15 15:55 ` Robert Richter
2012-10-15 17:23 ` Arun Sharma
2012-10-16 5:28 ` Anshuman Khandual
2012-10-16 10:08 ` Robert Richter
2012-10-16 12:21 ` Stephane Eranian
2012-10-19 17:05 ` Sukadev Bhattiprolu
2012-10-16 18:31 ` Sukadev Bhattiprolu
2012-10-24 12:27 ` Peter Zijlstra
2012-10-31 6:40 ` Sukadev Bhattiprolu [this message]
2012-10-31 7:22 ` Peter Zijlstra
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=20121031064056.GA12061@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=acme@redhat.com \
--cc=anton@au1.ibm.com \
--cc=asharma@fb.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@kernel.org \
--cc=mpjohn@us.ibm.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=robert.richter@amd.com \
/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).