HI Stefane,

Couldn't all this be solved by having opcontrol/ophelp use the pfmlib
event tables directory and ignoring everything in the events directory
of oprofile?

Phil

On Wed, 2007-01-10 at 02:42 -0800, Stephane Eranian wrote:
> Hello,
> 
> On Mon, Jan 08, 2007 at 01:17:40PM -0800, Stephane Eranian wrote:
> > This little exercise raised a few questions:
> > 
> >  - the code that uses the v2.3 interface (for all architectures) now relies
> >    on libpfm. You pass to pfm_dispatch_events() OProfile event names. So
> >    that assumes that OProfile and libpfm events match. I am not sure this
> >    is the case for all events on all x86 processors. We need to solve this.
> > 
> 
> After taking a closer look, I came to the conclusion that we cannot use
> libpfm to do the event assignment. There are several complictaed issues
> related to:
>       1/ Event names
> 
>          OProfile and libpfm may not use the same exact name for the same 
> event.
>          Finding an event in libpfm is based upon string matching.
> 
>       2/ Handling of unit masks
> 
>          In OProfile unit masks are provide using an hexadecimal bitmask.
>          In libpfm, they are provided using a string.
> 
> Reconciling both of those would require a lot of work.
> 
> An alternative is to let OProfile manage names and unit masks and have
> the daemon simply manage the mapping of OProfile counter indexes to
> perfmon counter indexes. Such mapping is trivial for many processors.
> It is more difficult for the P4. This approach is fairly similar to what
> we have today for OProfile on IA-64.
> 
> --
> -Stephane
> _______________________________________________
> perfmon mailing list
> [email protected]
> http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to