[PATCH] Fix oprofile sampling of marked events on POWER7
Maynard Johnson
maynardj at us.ibm.com
Sat May 2 03:17:57 EST 2009
Description
-----------
Change ppc64 oprofile kernel driver to use the SLOT bits (MMCRA[37:39]only on
older processors where those bits are defined.
Background
----------
The performance monitor unit of the 64-bit POWER processor family has the
ability to collect accurate instruction-level samples when profiling on marked
events (i.e., "PM_MRK_<event-name>"). In processors prior to POWER6, the MMCRA
register contained "slot information" that the oprofile kernel driver used to
adjust the value latched in the SIAR at the time of a PMU interrupt. But as of
POWER6, these slot bits in MMCRA are no longer necessary for oprofile to use,
since the SIAR itself holds the accurate sampled instruction address. With
POWER6, these MMCRA slot bits were zero'ed out by hardware so oprofile's use of
these slot bits was, in effect, a NOP. But with POWER7, these bits are no
longer zero'ed out; however, they serve some other purpose rather than slot
information. Thus, using these bits on POWER7 to adjust the SIAR value results
in samples being attributed to the wrong instructions. The attached patch
changes the oprofile kernel driver to ignore these slot bits on all newer
processors starting with POWER6.
Thanks.
-Maynard
Signed-off-by: Maynard Johnson <maynardj at us.ibm.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: oprof-p7.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090501/154a9913/attachment.txt>
More information about the Linuxppc-dev
mailing list