From: Peter Zijlstra Date: Wed, 24 Jun 2009 19:11:59 +0000 (+0200) Subject: perf_counter: Implement more accurate per task statistics X-Git-Tag: v2.6.31-rc2~30^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfbd3381e63aa2a14c6706afb50ce4630aa0d9a2;p=pandora-kernel.git perf_counter: Implement more accurate per task statistics With the introduction of PERF_EVENT_READ we have the possibility to provide accurate counter values for individual tasks in a task hierarchy. However, due to the lazy context switching used for similar counter contexts our current per task counts are way off. In order to maintain some of the lazy switch benefits we don't disable it out-right, but simply iterate the active counters and flip the values between the contexts. This only reads the counters but does not need to reprogram the full PMU. Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed