From: tip-bot for Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, acme@redhat.com,
hpa@zytor.com, mingo@redhat.com, efault@gmx.de,
peterz@infradead.org, mitake@dcl.info.waseda.ac.jp,
fweisbec@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf tools: Synthetize the targeted process
Date: Wed, 11 Nov 2009 07:42:46 GMT [thread overview]
Message-ID: <tip-de8967214d8ce536161a1ad6538ad1cb82e7428d@git.kernel.org> (raw)
In-Reply-To: <1257911467-28276-1-git-send-email-fweisbec@gmail.com>
Commit-ID: de8967214d8ce536161a1ad6538ad1cb82e7428d
Gitweb: http://git.kernel.org/tip/de8967214d8ce536161a1ad6538ad1cb82e7428d
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Wed, 11 Nov 2009 04:51:02 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 11 Nov 2009 07:30:17 +0100
perf tools: Synthetize the targeted process
Don't forget to also synthetize the targeted process from perf
record or we'll miss its dso in the events and then we won't be
able to deal with its build-id.
We are missing it because it is created after the existing
synthetized tasks but before the counters are enabled and can
send its mapping event.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-record.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index ab33381..9f98b86 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -497,13 +497,22 @@ static int __cmd_record(int argc, const char **argv)
if (target_pid == -1 && argc) {
pid = fork();
if (pid < 0)
- perror("failed to fork");
+ die("failed to fork");
if (!pid) {
if (execvp(argv[0], (char **)argv)) {
perror(argv[0]);
exit(-1);
}
+ } else {
+ /*
+ * Wait a bit for the execv'ed child to appear
+ * and be updated in /proc
+ * FIXME: Do you know a less heuristical solution?
+ */
+ usleep(1000);
+ event__synthesize_thread(pid,
+ process_synthesized_event);
}
child_pid = pid;
prev parent reply other threads:[~2009-11-11 7:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 3:51 [PATCH 1/6] " Frederic Weisbecker
2009-11-11 3:51 ` [PATCH 2/6] perf tools: Move the build-id storage operations to headers Frederic Weisbecker
2009-11-11 7:43 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-11-11 3:51 ` [PATCH 3/6] perf tools: Split up build id saving into fetch and write Frederic Weisbecker
2009-11-11 7:43 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-11-11 3:51 ` [PATCH 4/6] perf tools: Read the build-ids from the header layer Frederic Weisbecker
2009-11-11 7:43 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-11-11 3:51 ` [PATCH 5/6] perf tools: Use perf_header__set/has_feat whenever possible Frederic Weisbecker
2009-11-11 7:43 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-11-11 3:51 ` [PATCH 6/6] perf tools: Bring linear set of section headers for features Frederic Weisbecker
2009-11-11 6:20 ` Peter Zijlstra
2009-11-11 16:49 ` Frederic Weisbecker
2009-11-11 17:32 ` Arnaldo Carvalho de Melo
2009-11-11 7:44 ` [tip:perf/core] " tip-bot for Frederic Weisbecker
2009-11-11 7:42 ` tip-bot for Frederic Weisbecker [this message]
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-de8967214d8ce536161a1ad6538ad1cb82e7428d@git.kernel.org \
--to=fweisbec@gmail.com \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--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=mitake@dcl.info.waseda.ac.jp \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--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
all inboxes | Powered by JetHome®