From: tip-bot for Anton Blanchard <anton@samba.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, anton@samba.org, hpa@zytor.com,
mingo@redhat.com, a.p.zijlstra@chello.nl, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perfcounters/urgent] perf_counter: Log vfork as a fork event
Date: Sat, 18 Jul 2009 09:50:28 GMT [thread overview]
Message-ID: <tip-ed900c054b541254f0ce5cedaf75206e29bd614e@git.kernel.org> (raw)
In-Reply-To: <20090716104817.589309391@samba.org>
Commit-ID: ed900c054b541254f0ce5cedaf75206e29bd614e
Gitweb: http://git.kernel.org/tip/ed900c054b541254f0ce5cedaf75206e29bd614e
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Thu, 16 Jul 2009 15:44:29 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 18 Jul 2009 11:21:31 +0200
perf_counter: Log vfork as a fork event
Right now we don't output vfork events. Even though we should
always see an exec after a vfork, we may get perfcounter
samples between the vfork and exec. These samples can lead to
some confusion when parsing perfcounter data.
To keep things consistent we should always log a fork event. It
will result in a little more log data, but is less confusing to
trace parsing tools.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090716104817.589309391@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/fork.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index 467746b..4812d60 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1408,14 +1408,11 @@ long do_fork(unsigned long clone_flags,
if (clone_flags & CLONE_VFORK) {
p->vfork_done = &vfork;
init_completion(&vfork);
- } else if (!(clone_flags & CLONE_VM)) {
- /*
- * vfork will do an exec which will call
- * set_task_comm()
- */
- perf_counter_fork(p);
}
+ if (!(clone_flags & CLONE_THREAD))
+ perf_counter_fork(p);
+
audit_finish_fork(p);
tracehook_report_clone(regs, clone_flags, nr, p);
next prev parent reply other threads:[~2009-07-18 9:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 10:42 [patch 0/5] Various perfcounter fixes Anton Blanchard
2009-07-16 10:42 ` [patch 1/5] perf_counter: Make sure we dont leak kernel memory to userspace Anton Blanchard
2009-07-18 9:50 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-07-16 10:42 ` [patch 2/5] perf_counter: Synthesize VDSO mmap event Anton Blanchard
2009-07-18 9:50 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-07-16 10:42 ` [patch 3/5] perf_counter: Log vfork as a fork event Anton Blanchard
2009-07-18 9:50 ` tip-bot for Anton Blanchard [this message]
2009-07-16 10:42 ` [patch 4/5] perf_counter: Add perf record option to log addresses Anton Blanchard
2009-07-18 9:50 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-07-16 10:42 ` [patch 5/5] perf_counter: Make call graph option consistent Anton Blanchard
2009-07-16 14:49 ` Frederic Weisbecker
2009-07-18 9:50 ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-07-16 14:16 ` [patch 0/5] Various perfcounter fixes Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-ed900c054b541254f0ce5cedaf75206e29bd614e@git.kernel.org \
--to=anton@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox