perf: Fix PERF_FORMAT_GROUP scale info
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 20 Nov 2009 21:19:49 +0000 (22:19 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 21 Nov 2009 13:11:37 +0000 (14:11 +0100)
commitabf4868b8548cae18d4fe8bbfb4e207443be01be
tree0a8900bb5413826bc1f3ac9ccc435c4750dfedab
parentf6d9dd237da400effb265f3554c64413f8a3e7b4
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 <cjashfor@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091120212508.685559857@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c
This page took 0.026925 seconds and 5 git commands to generate.