From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: Perf Event support for ARMv7 (was: Re: [PATCH 5/5] arm/perfevents: implement perf event support for ARMv6)
Date: Mon, 21 Dec 2009 12:10:46 -0000 [thread overview]
Message-ID: <000901ca8236$a0e1adf0$e2a509d0$@deacon@arm.com> (raw)
In-Reply-To: <200912211243.07254.jpihet@mvista.com>
Hello,
* Jean Pihet wrote:
> > The maximum number of event counters on ARMv7 is currently 6 [Cortex-A9],
> > plus a cycle counter. Additionally, the number of event counters actually
> > available is implementation defined (the cycle counter is mandatory). You
> > can find out the number of event counters using the PMCR ((PMCR >> 11) &
> > 0x1f).
> I think we should support Cortex-A8 for now and add support for Cortex-A9 on
> top of it. IIUC a generic ARMV7 support is not possible so I will need
> separate handling for Cortex-A8 and -A9. Is that correct?
>
> Unfortunately I do not have any -A9 HW for now. I will look at the spec in
> order to spot the differences between both PMNC units.
Sorry, I should've mentioned that the PMU hardware interface is the same
across all v7 cores. The only difference is the core-specific event numberings.
A9 is also available in MP configurations, but that shouldn't cause many problems
for perf. I can test on an A9MP once you have something you're happy with.
> > Ok - the events so far are defined by the v7 architecture.
> > Note that this doesn't necessarily mean they are all supported by
> > the core.
> Is there a way to detect the supported PMU events at run-time? Is it harmful
> to use unsupported events?
The unsupported events for a given core are documented in the TRM.
For example, A9 doesn't support 0x08 and 0x0E but does support all
the other events defined by the architecture. It then has its own
set of extensions listed in the TRM [Section 9.2.1].
> Ok so I will need to separate Cortex-A8 from -A9.
Yep - but it's an easy thing to do.
> > I've implemented this for oprofile, I'll post it as an RFC after Christmas
> > as I won't be able to respond in the meantime.
> Ok. Do you know how I can differentiate Cortex-A8 from -A9?
The bottom two bytes of the main cpuid (read_cpuid_id()) are 0xC080 and 0xC090
for the A8 and A9 respectively.
> I will post a new version with the corrections.
Excellent. I can comment on things tomorrow as well, but then I'm off.
> Cheers and a good celebration time,
Thanks. I'll post my oprofile patches when I return. They cover these issues
already so hopefully you can spot anything I've missed.
Will
next prev parent reply other threads:[~2009-12-21 12:10 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 11:15 ARMv6 performance counters v3 Jamie Iles
2009-12-15 11:15 ` [PATCH 1/5] arm: provide a mechanism to reserve performance counters Jamie Iles
2009-12-15 11:15 ` [PATCH 2/5] arm/oprofile: reserve the PMU when starting Jamie Iles
2009-12-15 11:15 ` [PATCH 3/5] arm: use the spinlocked, generic atomic64 support Jamie Iles
2009-12-15 11:15 ` [PATCH 4/5] arm: enable support for software perf events Jamie Iles
2009-12-15 11:15 ` [PATCH 5/5] arm/perfevents: implement perf event support for ARMv6 Jamie Iles
2009-12-15 14:29 ` Will Deacon
2009-12-15 15:02 ` Jamie Iles
2009-12-15 15:05 ` Will Deacon
2009-12-15 15:19 ` Jamie Iles
2009-12-15 15:30 ` Peter Zijlstra
2009-12-15 15:36 ` Jamie Iles
2009-12-16 10:54 ` Jamie Iles
2009-12-16 11:04 ` Will Deacon
2009-12-16 11:19 ` Jamie Iles
2009-12-18 17:05 ` Perf Event support for ARMv7 (was: Re: [PATCH 5/5] arm/perfevents: implement perf event support for ARMv6) Jean Pihet
2009-12-19 10:29 ` Jamie Iles
2009-12-19 10:53 ` Ingo Molnar
2009-12-21 11:32 ` Jean Pihet
2009-12-21 11:29 ` Jean Pihet
2009-12-21 11:04 ` Will Deacon
2009-12-21 11:43 ` Jean Pihet
2009-12-21 12:10 ` Will Deacon [this message]
2009-12-21 12:43 ` Jamie Iles
2009-12-21 13:35 ` Jean Pihet
2009-12-22 16:51 ` Jean Pihet
2009-12-28 7:57 ` Ingo Molnar
2009-12-29 13:52 ` Jean Pihet
2009-12-29 16:32 ` Jamie Iles
2010-01-06 15:16 ` Michał Nazarewicz
2010-01-06 15:30 ` Jamie Iles
2010-01-07 17:02 ` Michał Nazarewicz
2009-12-29 13:58 ` Jean Pihet
2010-01-04 16:52 ` Will Deacon
2010-01-15 15:30 ` Jean Pihet
2010-01-15 15:39 ` Jamie Iles
2010-01-15 15:43 ` Jean Pihet
2010-01-15 15:49 ` Jamie Iles
2010-01-20 13:40 ` Will Deacon
2010-01-08 22:17 ` Woodruff, Richard
2010-01-15 15:34 ` Jean Pihet
2009-12-15 14:13 ` [PATCH 1/5] arm: provide a mechanism to reserve performance counters Will Deacon
2009-12-15 14:36 ` Jamie Iles
2009-12-15 17:06 ` Will Deacon
2009-12-17 16:14 ` Will Deacon
2009-12-17 16:27 ` Jamie Iles
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='000901ca8236$a0e1adf0$e2a509d0$@deacon@arm.com' \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.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).