> > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/