---...
Subject: perf: Fix exit() vs event-groups
From: Peter Zijlstra<a.p.zijlstra@xxxxxxxxx>
Date: Tue May 11 16:19:10 CEST 2010
Corey reported that the value scale times of group siblings are not
updated when the monitored task dies.
The problem appears to be that we only update the group leader's
time values, fix it by updating the whole group.
Reported-by: Corey Ashford<cjashfor@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Peter Zijlstra<a.p.zijlstra@xxxxxxxxx>
Cc: Paul Mackerras<paulus@xxxxxxxxx>
Cc: stable@xxxxxxxxxx
---
kernel/perf_event.c | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
Index: linux-2.6/kernel/perf_event.c
===================================================================
--- linux-2.6.orig/kernel/perf_event.c
+++ linux-2.6/kernel/perf_event.c
@@ -255,6 +255,18 @@ static void update_event_times(struct pe
event->total_time_running = run_end - event->tstamp_running;
}
+/*
+ * Update total_time_enabled and total_time_running for all events in a group.
+ */