Kevin, Stephane - I've been implementing the libpfm event tables for PAPI on various platforms. So far I've been pretty successful with Intel Core and P6 variants, and with AMD Opteron. Yesterday I started working on Pentium 4.
I quickly stumbled onto the limitation discussed below, namely that event tagging is not supported. Although I currently don't need filtering and cascading, tagging is critical for counting retired FPU events (the all-important FLOPS comes to mind...). The trick is that the 4 required tag bits are in the ESCR, outside the normal 16-bit unit mask. In PAPI, I cheated by recognizing that the low order bits of the events of interest were not used. I folded the tag bits into the unit mask, and unfolded them prior to programming the registers. This is messy and less than satisfactory. An alternative would be to define the unit mask as 20 bits for all events and then shift appropriately. Or maybe define bits as signed and allow negative values to indicate tags. I realize that fully supporting this stuff requires non-trivial code changes to pfmlib_pentium4.c, but for right now my main concern is getting the data encoded into the event table in a way that I can get it back out. This implies a change to the data structure (and the data) and a modification of the unit mask routines in pfmlib_pentium4.c. I'd be willing to implement and test a first pass on these changes if we can agree on an approach. - dan terpstra > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:perfmon- > [EMAIL PROTECTED] On Behalf Of Kevin Corry > Sent: Thursday, August 24, 2006 2:24 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [perfmon] 2.6.17.9 new perfmon code base, libpfm,and pfmon > packages > > On Thu August 24 2006 10:44 am, Stephane Eranian wrote: > > On Thu, Aug 24, 2006 at 10:10:17AM -0500, Kevin Corry wrote: > > > I've definitely been able to count things on P4 with pfmon. > > > > That's excellent. No offense for the comment, I think I was still under > > the impression it was very preliminary (from your own comments) > > and that it was not counting yet. > > > > Obviously, I was wrong, my apologies. > > Not a problem. You're right that I did mention that the support is not > complete - there are features of the P4 PMU that I still want to add > support > for: event filtering, event tagging, and event cascading. But the code > that's > there now is useable for basic event counting. > _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
