Messages in this thread | | | Date | Thu, 26 Sep 2013 08:45:19 -0700 | From | Andi Kleen <> | Subject | Re: [RFC 00/21] perf tools: Add toggling events support |
| |
> > It would be better to keep counting and just do RDPMC on the switch > > points, and then subtract for counting. For sampling could need a MSR > > write to enable/disable. Still somewhat expensive, but nowhere near as > > bad as a full switch. > > This is essentially an optimized event switch and should probably be done > on a higher level so that other instances of event/context switching > benefit as well.
Ok. Need to be a bit careful and it cannot be done in all cases.
For non global counters this only works if RDPMC is disabled, otherwise it leaks counter interformation between unrelated processes, which may be a security problem.
-Andu
| |