Re: [PATCH 6/7] perf_counter: change pctrl() behaviour

From: Peter Zijlstra
Date: Sat May 23 2009 - 15:04:31 EST


On Sat, 2009-05-23 at 18:29 +0200, Peter Zijlstra wrote:
> plain text document attachment (perf_counter-ctrl-all.patch)
> Instead of en/dis-abling all counters acting on a particular task, en/dis-
> able all counters we created.
>
> LKML-Reference: <new-submission>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> ---

Please fold in the below so as to avoid an explosion on first
sys_perf_counter_open().

Index: linux-2.6/kernel/perf_counter.c
===================================================================
--- linux-2.6.orig/kernel/perf_counter.c
+++ linux-2.6/kernel/perf_counter.c
@@ -3446,6 +3446,9 @@ void perf_counter_init_task(struct task_

child->perf_counter_ctxp = NULL;

+ mutex_init(&child->perf_counter_mutex);
+ INIT_LIST_HEAD(&child->perf_counter_list);
+
/*
* This is executed from the parent task context, so inherit
* counters that have been marked for cloning.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/