diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-19 09:50:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-25 07:05:06 -0400 |
commit | e4cbb4e3ac8b09fdb11e39e5a5611bfab0a7cd1a (patch) | |
tree | 987f159fe3867781460c51e3363969efaeee2c8a | |
parent | d94b943054721c346b0881865d645f000cd19880 (diff) |
perf_counter: Move child perfcounter init to after scheduler init
Initialize a task's perfcounters (inherit from parent, etc.) after
the child task's scheduler fields have been initialized already.
[ Impact: cleanup ]
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/fork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index e72a09f5355b..675e01e9072a 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -984,7 +984,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
984 | goto fork_out; | 984 | goto fork_out; |
985 | 985 | ||
986 | rt_mutex_init_task(p); | 986 | rt_mutex_init_task(p); |
987 | perf_counter_init_task(p); | ||
988 | 987 | ||
989 | #ifdef CONFIG_PROVE_LOCKING | 988 | #ifdef CONFIG_PROVE_LOCKING |
990 | DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled); | 989 | DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled); |
@@ -1096,6 +1095,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1096 | 1095 | ||
1097 | /* Perform scheduler related setup. Assign this task to a CPU. */ | 1096 | /* Perform scheduler related setup. Assign this task to a CPU. */ |
1098 | sched_fork(p, clone_flags); | 1097 | sched_fork(p, clone_flags); |
1098 | perf_counter_init_task(p); | ||
1099 | 1099 | ||
1100 | if ((retval = audit_alloc(p))) | 1100 | if ((retval = audit_alloc(p))) |
1101 | goto bad_fork_cleanup_policy; | 1101 | goto bad_fork_cleanup_policy; |