[PATCH 4/8] perf: update the context time on exit

Peter Zijlstra
2009-11-23T10:41:41Z

[-- Attachment #1: perf-foo-3.patch --]
[-- Type: text/plain, Size: 790 bytes --]

It appeared we did call update_event_times() on exit, but we failed to
update the context time, which renders the former moot.

XXX: locking is a bit iffy, we call update_event_times under
ctx->mutex instead of ctx->lock, should probably be fixed in
some way.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
kernel/perf_event.c | 1 +
1 file changed, 1 insertion(+)

Index: linux-2.6/kernel/perf_event.c
===================================================================
--- linux-2.6.orig/kernel/perf_event.c
+++ linux-2.6/kernel/perf_event.c
@@ -4982,6 +4982,7 @@ void perf_event_exit_task(struct task_st
* the events from it.
*/
unclone_ctx(child_ctx);
+ update_context_time(child_ctx);
spin_unlock_irqrestore(&child_ctx->lock, flags);

/*

--