On Wed, Oct 7, 2009 at 10:46 PM, David Miller <da...@davemloft.net> wrote: > From: stephane eranian <eran...@googlemail.com> > Date: Wed, 7 Oct 2009 14:31:58 +0200 > >> What PPC does is probably the only way to do this given the interface between >> generic and machine-specific code. The one advantage I see is that it works >> inside an event group but also across event groups because that code does not >> look at group boundary, it only looks at the events and the number of >> available >> registers. The downside is that you duplicate state. >> >> Did I get this right, Paul? > > That's basically how his code works, yes. I intend on duplicating > it to some extent on sparc64 since I'm operating in a similar > problem space. > > So if at least some of this engine went to a generic place, there'd > be at least a 3rd user :-)
Based on my experience, the assignment problem is best handled in the architecture or model specific code. On some PMU models, it is way more complicated than just two events competing for the same counter. That's the case on Itanium, for instance. And that is also the case with AMD64 Northbridge events. Something I forgot to mention earlier is that when you re-run the assignment code for the new event, no already assigned event can be kicked out in favor of the new event. An existing event can be moved to another counter at worst. Otherwise, you will evict an event which, the generic layer thinks, is currently running. > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel