From: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>,
mingo@elte.hu,
linux kernel mailing list <linux-kernel@vger.kernel.org>,
a.p.zijlstra@chello.nl
Subject: [PATCH 3/3] perf: Fix the bug which fails to put memory mapping to record file
Date: Fri, 25 Jun 2010 10:18:46 +0800 [thread overview]
Message-ID: <4C241206.8040708@cn.fujitsu.com> (raw)
In-Reply-To: <4C241140.9090008@cn.fujitsu.com>
If we execute perf record without -t or -p option, it fails to load
process memory map to record file. Here fix it.
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
tools/perf/builtin-record.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 84d58b7..f834d21 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -685,9 +685,19 @@ static int __cmd_record(int argc, const char **argv)
if (perf_guest)
perf_session__process_machines(session, event__synthesize_guest_os);
- if (!system_wide && profile_cpu == -1)
- event__synthesize_thread(target_tid, process_synthesized_event,
- session);
+ if (!system_wide && profile_cpu == -1) {
+ int ret;
+
+ if (target_tid != -1) {
+ ret = event__synthesize_thread(target_tid,
+ process_synthesized_event,
+ session);
+ } else {
+ ret = event__synthesize_thread(all_tids[0],
+ process_synthesized_event,
+ session);
+ }
+ }
else
event__synthesize_threads(process_synthesized_event, session);
-- 1.6.5.2
next prev parent reply other threads:[~2010-06-25 2:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 2:15 [PATCH 1/3] perf kvm: Get rid of unused guest_kallsyms Gui Jianfeng
2010-06-25 2:16 ` [PATCH 2/3] perf: Remove dead code in buildin-record.c Gui Jianfeng
2010-06-25 13:13 ` Arnaldo Carvalho de Melo
2010-06-25 14:48 ` Peter Zijlstra
2010-06-26 15:14 ` Matt Fleming
2010-06-26 18:12 ` Arnaldo Carvalho de Melo
2010-07-18 20:06 ` Matt Fleming
2010-08-04 10:56 ` Peter Zijlstra
2010-08-04 11:25 ` Matt Fleming
2010-06-25 2:18 ` Gui Jianfeng [this message]
2010-06-25 15:29 ` [tip:perf/core] perf kvm: Get rid of unused guest_kallsyms tip-bot for Gui Jianfeng
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=4C241206.8040708@cn.fujitsu.com \
--to=guijianfeng@cn.fujitsu.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yanmin_zhang@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.