From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Cc: Anton Blanchard <anton@au1.ibm.com>,
Paul Mackerras <paulus@samba.org>,
Stephane Eranian <eranian@google.com>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: [PATCH 2/7] powerpc/perf: Export Power8 generic events in sysfs
Date: Sat, 10 Aug 2013 10:50:09 -0700 [thread overview]
Message-ID: <20130810175009.GC15551@us.ibm.com> (raw)
In-Reply-To: <20130810174831.GA15551@us.ibm.com>
[PATCH 2/7] powerpc/perf: Export Power8 generic events in sysfs
Export existing Power8 generic events in sysfs.
Cc: Paul Mckerras <paulus@samba.org>
Cc: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
arch/powerpc/perf/power8-pmu.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c
index 30c6b12..ff98fb8 100644
--- a/arch/powerpc/perf/power8-pmu.c
+++ b/arch/powerpc/perf/power8-pmu.c
@@ -510,6 +510,28 @@ static void power8_disable_pmc(unsigned int pmc, unsigned long mmcr[])
mmcr[1] &= ~(0xffUL << MMCR1_PMCSEL_SHIFT(pmc + 1));
}
+GENERIC_EVENT_ATTR(cpu-cyles, PM_CYC);
+GENERIC_EVENT_ATTR(stalled-cycles-frontend, PM_GCT_NOSLOT_CYC);
+GENERIC_EVENT_ATTR(stalled-cycles-backend, PM_CMPLU_STALL);
+GENERIC_EVENT_ATTR(instructions, PM_INST_CMPL);
+GENERIC_EVENT_ATTR(branch-instructions, PM_BRU_FIN);
+GENERIC_EVENT_ATTR(branch-misses, PM_BR_MPRED_CMPL);
+
+static struct attribute *power8_events_attr[] = {
+ GENERIC_EVENT_PTR(PM_CYC),
+ GENERIC_EVENT_PTR(PM_GCT_NOSLOT_CYC),
+ GENERIC_EVENT_PTR(PM_CMPLU_STALL),
+ GENERIC_EVENT_PTR(PM_INST_CMPL),
+ GENERIC_EVENT_PTR(PM_BRU_FIN),
+ GENERIC_EVENT_PTR(PM_BR_MPRED_CMPL),
+ NULL
+};
+
+static struct attribute_group power8_pmu_events_group = {
+ .name = "events",
+ .attrs = power8_events_attr,
+};
+
PMU_FORMAT_ATTR(event, "config:0-49");
PMU_FORMAT_ATTR(pmcxsel, "config:0-7");
PMU_FORMAT_ATTR(mark, "config:8");
@@ -546,6 +568,7 @@ struct attribute_group power8_pmu_format_group = {
static const struct attribute_group *power8_pmu_attr_groups[] = {
&power8_pmu_format_group,
+ &power8_pmu_events_group,
NULL,
};
--
1.7.1
next prev parent reply other threads:[~2013-08-10 17:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-10 17:48 [PATCH 0/7]: Enable 'perf mem' command for Power Sukadev Bhattiprolu
2013-08-10 17:49 ` [PATCH 1/7] powerpc/perf: Rename Power8 macros to start with PME Sukadev Bhattiprolu
2013-08-10 17:50 ` Sukadev Bhattiprolu [this message]
2013-08-10 17:50 ` [PATCH 3/7] powerpc/perf: Create mem-loads/mem-stores events for Power8 Sukadev Bhattiprolu
2013-08-10 17:51 ` [PATCH 4/7] powerpc/perf: Create mem-loads/mem-stores events for Power7 Sukadev Bhattiprolu
2013-08-10 17:51 ` [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src Sukadev Bhattiprolu
2013-08-11 2:34 ` Vince Weaver
2013-08-11 17:15 ` Sukadev Bhattiprolu
2013-08-11 23:57 ` Michael Ellerman
2013-08-12 3:19 ` Vince Weaver
2013-08-10 17:52 ` [PATCH 6/7] powerpc/perf: Export Power8 memory hierarchy info to user space Sukadev Bhattiprolu
2013-08-10 17:52 ` [PATCH 7/7] powerpc/perf: Export Power7 " 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=20130810175009.GC15551@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=anton@au1.ibm.com \
--cc=eranian@google.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).