aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-02-05 09:02:42 -0800
committerIngo Molnar <[email protected]>2010-02-08 16:55:52 +0100
commitf7e7ee36757f68778700cde1aaed89e1d23e59fd (patch)
treec6ea53150b5835324446aedc6418819211ff0bc2
parent076dc4a65a6d99a16979e2c7917e669fb8c91ee5 (diff)
perf record: Fix existing process callgraph symbol
When 'perf record -g' a existing process, even with debuginfo packages, still cannnot get symbol from 'perf report'. try: perf record -g -p `pidof xxx` -f perf report 68.26% :1181 b74870f2 [.] 0x000000b74870f2 | |--32.09%-- 0xb73b5b44 | 0xb7487102 | 0xb748a4e2 | 0xb748633d | 0xb73b41cd | 0xb73b4467 | 0xb747d531 The reason is: for existing process, in __cmd_record(), the pid is 0 rather than the existing process id. Signed-off-by: Austin Zhang <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Frederic Weisbecker <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--tools/perf/builtin-record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3ad599b12c91..771533ced6a8 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -570,7 +570,7 @@ static int __cmd_record(int argc, const char **argv)
}
if (!system_wide && profile_cpu == -1)
- event__synthesize_thread(pid, process_synthesized_event,
+ event__synthesize_thread(target_pid, process_synthesized_event,
session);
else
event__synthesize_threads(process_synthesized_event, session);