aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-03 05:23:56 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-03 08:14:30 -0400
commit226f62fdd53d5b2c74e242aa11f6ad43d0285d3f (patch)
treebfe54a45e7fe85520c0675c2f8e90b7704aad4ff /kernel
parentdcd945e0d8a6d654e3e1de51faea9f98f1504aa5 (diff)
perf_counter: Add a comm hook for pure fork()s
I noticed missing COMM events and found that we missed reporting them for pure forks. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 23bf757ed321..b7d7a9f0bd7a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1412,6 +1412,12 @@ long do_fork(unsigned long clone_flags,
1412 if (clone_flags & CLONE_VFORK) { 1412 if (clone_flags & CLONE_VFORK) {
1413 p->vfork_done = &vfork; 1413 p->vfork_done = &vfork;
1414 init_completion(&vfork); 1414 init_completion(&vfork);
1415 } else {
1416 /*
1417 * vfork will do an exec which will call
1418 * set_task_comm()
1419 */
1420 perf_counter_comm(p);
1415 } 1421 }
1416 1422
1417 audit_finish_fork(p); 1423 audit_finish_fork(p);