From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@redhat.com>,
Michael Ellerman <michaele@au1.ibm.com>,
Paul Mackerras <paulus@samba.org>
Cc: peterz@infradead.org, linuxppc-dev@lists.ozlabs.org,
dev@codyps.com, linux-kernel@vger.kernel.org
Subject: [PATCH v5 0/4] Add support for parametrized events
Date: Tue, 2 Dec 2014 18:09:34 -0800 [thread overview]
Message-ID: <1417572578-9051-1-git-send-email-sukadev@linux.vnet.ibm.com> (raw)
Description of "event parameters" from the documentation patch:
Event parameters are a basic way for partial events to be specified in
sysfs with per-event names given to the fields that need to be filled in
when using a particular event.
It is intended for supporting cases where the single 'cpu' parameter is
insufficient. For example, POWER 8 has events for physical
sockets/cores/cpus that are accessible from with virtual machines. To
keep using the single 'cpu' parameter we'd need to perform a mapping
between Linux's cpus and the physical machine's cpus (in this case
Linux is running under a hypervisor). This isn't possible because
bindings between our cpus and physical cpus may not be fixed, and we
probably won't have a "cpu" on each physical cpu.
Description of the sysfs contents when events are parameterized (copied from an
included patch):
Examples:
domain=0x1,offset=0x8,starting_index=$core
In the case of the last example, a value replacing "$core" would need
to be provided by the user selecting the particular event. This is
refered to as "event parameterization". All non-numerical values
indicate an event parameter.
Notes on how perf-list displays parameterized events
PARAMETERIZED EVENTS
--------------------
Some pmu events listed by 'perf list' will be displayed with '$xyz' in
them. For example:
hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,starting_index=$core/
This means that when provided as an event, a value for $core must also
be supplied. For example:
perf stat -e \
'hv_24x7/HPM_THREAD_NAP_CCYC__PHYS_CORE,starting_index=2'
...
Changelog[v5]
- [Jiri Olsa, Peter Zijlstra] Use '$arg' notation rather than ?
to indicate event parameters.
- [Michael Ellerman] Separate the kernel and tool patches in the
patchset into different patchsets.
Changelog[v4]
- [Jiri Olsa] Rebase to perf/core tree (fix small merge conflict)
Changelog[v3]
- [Jiri Olsa] Changed the event parameters are specified. If
event file specifes 'param=val' make the usage 'param=123'
rather than 'val=123'. (patch 1,2/10)
- Shortened event names using "PHYS" and "VCPU" (patch 4/10)
- Print help message if invalid parameter is specified or required
parameter is missing.
- Moved 3 patches that are unrelated to parametrized events into
a separate patchset.
- Reordered patches so code changes come first.
Changelog[v2]
- [Joe Perches, David Laight] Use beNN_to_cpu() instead of guessing
the size from type.
- Use kmem_cache_free() to free page allocated with kmem_cache_alloc().
- Rebase to recent kernel
Cody P Schafer (4):
tools/perf: support parsing parameterized events
tools/perf: extend format_alias() to include event parameters
perf Documentation: add event parameters
tools/perf: Document parameterized and symbolic events
.../testing/sysfs-bus-event_source-devices-events | 6 ++
tools/perf/Documentation/perf-list.txt | 13 +++
tools/perf/Documentation/perf-record.txt | 12 +++
tools/perf/Documentation/perf-stat.txt | 20 ++++-
tools/perf/util/parse-events.h | 1 +
tools/perf/util/pmu.c | 92 +++++++++++++++++++---
6 files changed, 128 insertions(+), 16 deletions(-)
--
1.8.3.1
next reply other threads:[~2014-12-03 2:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 2:09 Sukadev Bhattiprolu [this message]
2014-12-03 2:09 ` [PATCH v5 1/4] tools/perf: support parsing parameterized events Sukadev Bhattiprolu
2014-12-04 12:44 ` Jiri Olsa
2014-12-05 23:05 ` Cody P Schafer
2014-12-06 12:20 ` Jiri Olsa
2014-12-07 7:37 ` Sukadev Bhattiprolu
2014-12-08 10:59 ` Jiri Olsa
2014-12-03 2:09 ` [PATCH v5 2/4] tools/perf: extend format_alias() to include event parameters Sukadev Bhattiprolu
2014-12-03 2:09 ` [PATCH v5 3/4] perf Documentation: add " Sukadev Bhattiprolu
2014-12-03 2:09 ` [PATCH v5 4/4] tools/perf: Document parameterized and symbolic events Sukadev Bhattiprolu
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=1417572578-9051-1-git-send-email-sukadev@linux.vnet.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=dev@codyps.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michaele@au1.ibm.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.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).