mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
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>
This commit is contained in:
parent
dcd945e0d8
commit
226f62fdd5
1 changed files with 6 additions and 0 deletions
|
@ -1412,6 +1412,12 @@ long do_fork(unsigned long clone_flags,
|
||||||
if (clone_flags & CLONE_VFORK) {
|
if (clone_flags & CLONE_VFORK) {
|
||||||
p->vfork_done = &vfork;
|
p->vfork_done = &vfork;
|
||||||
init_completion(&vfork);
|
init_completion(&vfork);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* vfork will do an exec which will call
|
||||||
|
* set_task_comm()
|
||||||
|
*/
|
||||||
|
perf_counter_comm(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
audit_finish_fork(p);
|
audit_finish_fork(p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue