From: tip-bot for Sukadev Bhattiprolu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
eranian@google.com, mingo@redhat.com, paulus@samba.org,
hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
michael@ellerman.id.au, jolsa@redhat.com, robert.richter@amd.com,
anton@au1.ibm.com, ak@linux.intel.com, tglx@linutronix.de,
sukadev@linux.vnet.ibm.com
Subject: [tip:perf/urgent] perf/POWER7: Create a sysfs format entry for Power7 events
Date: Mon, 18 Mar 2013 03:57:13 -0700 [thread overview]
Message-ID: <tip-3bf7b07ece6e00747602938f68c1db8001b9925f@git.kernel.org> (raw)
In-Reply-To: <20130306054826.GA14627@us.ibm.com>
Commit-ID: 3bf7b07ece6e00747602938f68c1db8001b9925f
Gitweb: http://git.kernel.org/tip/3bf7b07ece6e00747602938f68c1db8001b9925f
Author: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
AuthorDate: Tue, 5 Mar 2013 21:48:26 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 13 Mar 2013 17:01:04 -0300
perf/POWER7: Create a sysfs format entry for Power7 events
Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event'
which describes the format of the POWER7 PMU events.
This code is based on corresponding code in x86.
Changelog[v4]: [Michael Ellerman, Paul Mckerras] The event format is different
for other POWER cpus. So move the code to POWER7-specific,
power7-pmu.c Also, the POWER7 format uses bits 0-19 not 0-20.
Changelog[v2]: [Jiri Osla] Use PMU_FORMAT_ATTR rather than duplicating code.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Tested-by: Michael Ellerman <michael@ellerman.id.au>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: benh@kernel.crashing.org
Cc: linuxppc-dev@ozlabs.org
Link: http://lkml.kernel.org/r/20130306054826.GA14627@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
arch/powerpc/perf/power7-pmu.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/powerpc/perf/power7-pmu.c b/arch/powerpc/perf/power7-pmu.c
index b554879..3c475d6 100644
--- a/arch/powerpc/perf/power7-pmu.c
+++ b/arch/powerpc/perf/power7-pmu.c
@@ -420,7 +420,20 @@ static struct attribute_group power7_pmu_events_group = {
.attrs = power7_events_attr,
};
+PMU_FORMAT_ATTR(event, "config:0-19");
+
+static struct attribute *power7_pmu_format_attr[] = {
+ &format_attr_event.attr,
+ NULL,
+};
+
+struct attribute_group power7_pmu_format_group = {
+ .name = "format",
+ .attrs = power7_pmu_format_attr,
+};
+
static const struct attribute_group *power7_pmu_attr_groups[] = {
+ &power7_pmu_format_group,
&power7_pmu_events_group,
NULL,
};
next prev parent reply other threads:[~2013-03-18 10:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 6:22 [PATCH 0/6][v4]: perf: Make POWER7 events available in sysfs Sukadev Bhattiprolu
2013-01-23 6:23 ` [PATCH 1/6][v4]: perf/Power7: Use macros to identify perf events Sukadev Bhattiprolu
2013-02-01 10:59 ` [tip:perf/core] " tip-bot for Sukadev Bhattiprolu
2013-01-23 6:24 ` [PATCH 2/6][v4]: perf: Make EVENT_ATTR global Sukadev Bhattiprolu
2013-02-01 11:00 ` [tip:perf/core] " tip-bot for Sukadev Bhattiprolu
2013-01-23 6:24 ` [PATCH 3/6][v4]: perf/POWER7: Make generic event translations available in sysfs Sukadev Bhattiprolu
2013-02-01 11:01 ` [tip:perf/core] " tip-bot for Sukadev Bhattiprolu
2013-01-23 6:25 ` [PATCH 4/6][v4]: perf/POWER7: Make some POWER7 events " Sukadev Bhattiprolu
2013-02-01 11:02 ` [tip:perf/core] " tip-bot for Sukadev Bhattiprolu
2013-01-23 6:26 ` [PATCH 5/6][v4]: perf: Create a sysfs entry for Power event format Sukadev Bhattiprolu
2013-02-26 5:26 ` Michael Ellerman
2013-02-26 20:03 ` Sukadev Bhattiprolu
2013-02-27 1:17 ` Michael Ellerman
2013-03-06 5:48 ` Sukadev Bhattiprolu
2013-03-12 9:27 ` Paul Mackerras
2013-03-13 0:15 ` Michael Ellerman
2013-03-18 10:57 ` tip-bot for Sukadev Bhattiprolu [this message]
2013-02-27 1:27 ` Michael Ellerman
2013-01-23 6:26 ` [PATCH 6/6][v4]: perf: Document the ABI of perf sysfs entries Sukadev Bhattiprolu
2013-02-01 11:04 ` [tip:perf/core] " tip-bot for 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=tip-3bf7b07ece6e00747602938f68c1db8001b9925f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=anton@au1.ibm.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=michael@ellerman.id.au \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=robert.richter@amd.com \
--cc=sukadev@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/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).