From: Peter Zijlstra Date: Fri, 20 Nov 2009 21:19:49 +0000 (+0100) Subject: perf: Fix PERF_FORMAT_GROUP scale info X-Git-Tag: v2.6.33-rc1~399^2~133 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abf4868b8548cae18d4fe8bbfb4e207443be01be;p=pandora-kernel.git perf: Fix PERF_FORMAT_GROUP scale info As Corey reported, the total_enabled and total_running times could occasionally be 0, even though there were events counted. It turns out this is because we record the times before reading the counter while the latter updates the times. This patch corrects that. While looking at this code I found that there is a lot of locking iffyness around, the following patches correct most of that. Reported-by: Corey Ashford Signed-off-by: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <20091120212508.685559857@chello.nl> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed