[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C241206.8040708@cn.fujitsu.com>
Date: Fri, 25 Jun 2010 10:18:46 +0800
From: Gui Jianfeng <guijianfeng@...fujitsu.com>
To: Arnaldo Carvalho de Melo <acme@...hat.com>
CC: Yanmin Zhang <yanmin_zhang@...ux.intel.com>, mingo@...e.hu,
linux kernel mailing list <linux-kernel@...r.kernel.org>,
a.p.zijlstra@...llo.nl
Subject: [PATCH 3/3] perf: Fix the bug which fails to put memory mapping to
record file
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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists