On Thu, 24 Apr 2014, Stephane Eranian wrote:

> Just like Phil, I am not sure I understand the enumeration problem you're
> alluding to.
> Look at showevtinfo.c in libpfm4. It lists the events and does not end up in
> an infinite
> loop when there are aliases.

iterating through all events in a loop is not a problem.

the problem is the PAPI enum interface.

It looks like this:

        PAPI_enum_event(int *EventCode, int modifier);

Where we pass in an arbitrary EventCode and need to map that to
"next event".  We aren't even necessarily running in a tight loop,
the request might happen much much later than the last time it is called.

The major problem is the event aliasing libpfm4 does.  If your event 
aliases to one that happens elsewhere in the libpfm4 table, then if you 
try to look it up, get aliased, then look at next you can either get stuck 
in infinite loops or else skip large chunks of events.  The current PAPI 
code goes through a lot of trouble to avoid this issue.

Now it's possible that the enum_event interface is broken and we should 
drop it and re-implement it.

Vince

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to