From: Stephane E. <er...@hp...> - 2006-04-05 19:08:24
|
Will, On Wed, Apr 05, 2006 at 02:57:01PM -0400, William Cohen wrote: > Andi Kleen wrote: > >On Wednesday 05 April 2006 10:31, Stephane Eranian wrote: > > > > > >>The other aspect to keep in mind here is that counters are not always > >>symetrical. Not all events can be measured on any counter. Few CPUs have > >>that level of flexibility. I think Pentium M and AMD Opteron do, but P4 > >>does not. If you remove certain counters it may not be possible to make > >>certain measurements anymore. > > > > > >P4 has at least two counters per group, possible more. NMI watchdog > >will never use more than one. So any counter should be still accessible. > > Is this still true when hyperthreading is being used? A number of the > tools, e.g. split the perf counters between the threads, leaving only > one register in a group on a processor. > This is a good point. Yes, perfmon does split the register file in two. The user sees on 8 counters and those 8 are mapped into one half of the other depending of which HW thread the program executes on. That is the only way to let two programs using the counters run on the same CPU core. -- -Stephane |