From: Maynard J. <may...@us...> - 2005-10-18 15:50:07
|
John Levon wrote: > On Thu, Oct 13, 2005 at 02:41:57PM -0500, Maynard Johnson wrote: > > >>Hi, Philippe, >>Anton indicates below he's open to adding something in the kernel driver >>to handle the 970 and power4 cases if older oprofile is used on top of a >>newer kernel. So, can we get the user space patch applied now? > > > Please resend the patch + change log. > > john > OK, I "freshened" the patch against today's CVS, fixing up the ChangeLog entry. Below is the original text of the note I sent when I first posted the patch. ================================================================ The Power 4 and PowerPC970 chips require the SAMPLE_ENABLE bit (MMCRA[63]) be set to '1' for the purpose of sampling. In the early days of PPC64 support for OProfile, the PPC64 driver was coded such that it always forced this bit to '1' for all PPC64 processors. However, we've gotten feedback from users telling us this usually not the appropriate behavior for Power5. Our response to this user feedback involves two actions: 1) Change the PPC64 kernel driver for OProfile (in mainline kernel development tree) so it sets the SAMPLE_ENABLE bit based on values passed from userspace. 2) Change the PPC64 event information files in OProfile userspace so the bit is set as appropriate for the type of processor. Action #1 will, of course, be handled via the LKML. The attached patch addresses action #2. Additionally, this patch adds a new event to the Power5 event info files, based on user request. This patch will have no effect on Power4 and PowerPC970 users -- it merely changes which side of the user/kernel interface is forcing the SAMPLE_ENABLE bit to '1'. Power5 users will not see any difference until they are able to run OProfile on a kernel version that has the patch described above in action #1. At that time, they will be able to choose between the two different modes of sampling available on the Power5 -- random and continuous. Thanks. Maynard |