One potential problem with this is that the stats can be further out of
date.
Consider this case:
cpu0 reads some of the registers, then gets preempted/interrupted
cpu1 reads all the registers, updates the stats, then dumps the data
At this point cpu1 dumped information that doesn't include the registers
that cpu0 was in the middle of updating. Eventually cpu0 will run again
and the stats will be accurate, but there is a window where the stats
may be self-inconsistent and the various counts may not add up.
Chris
--