"stephane eranian" <eran...@googlemail.com> wrote on 12/12/2008 04:25:36 
PM:

> Corey,
> 
> On Sat, Dec 13, 2008 at 1:19 AM, Corey J Ashford <cjash...@us.ibm.com> 
wrote:
> >>
> >> Question: is it possible to measure cycles twice on your machine?
> >
> > You mean in two different counters?  Yes, in one configuration.  There 
are
> > some groups which can count cycles in counters 1-4 which are
> > interrupt-capable.  The current libpfm code will not allow 
mixed-privilege
> > level counting.  All groups include counters 5 & 6, so if you do count 
in
> > PLM3|PLM1|PLM0 mode, you could count cycles on counter 1 and counter 5
> > simultaneously.  However, the current libpfm won't deal with this case
> > like you might like: when looking for a cycles counter, it will find
> > counter 1 twice.  Is using two separate counters for this case 
required?
> 
> Yes.
> I am guessing, your code says: requesting cycles twice with the same plm
> therefore, I can use the same counter twice. Unfortunately, this is 
> not the case
> one may be used for counting, the other for sampling. This is the case 
here.
> 
> > It sounds like it is, since one counts while the other one overflows.
> >
> Exactly. You need one counter per event you are requesting.
> 
> 
> See why having the event table + logic in the kernel may cause 
problems...

Yes, this is a good example of where this sort of functionality being in 
userspace helps.

So it looks like we need a libpfm fix here.  For Power6 at PLM3 privilege 
level, libpfm's response should be ECNFLCT.  At PLM3|PLM1|PLM0, the 
response should be to allocate two separate counters.

Thanks,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR 
503-578-3507 
cjash...@us.ibm.com


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to