]> git.baikalelectronics.ru Git - kernel.git/commit
perf_counter: Collapse inherit on read()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 24 Jul 2009 12:42:10 +0000 (14:42 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 2 Aug 2009 11:47:54 +0000 (13:47 +0200)
commit7fae365c479a5427b633cc20c46a4513e7eb88f5
tree5182e8f91bffae8fcbe05a9b86e761f84b0f079e
parent92e6533477a8c59479da0e2213c0fb584d8f252b
perf_counter: Collapse inherit on read()

Currently the counter value returned by read() is the value of
the parent counter, to which child counters are only fed back
on child exit.

Thus read() can return rather erratic (and meaningless) numbers
depending on the state of the child processes.

Change this by always iterating the full child hierarchy on
read() and sum all counters.

Suggested-by: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c