Skip to contentSkip to conversation

fixed: perf cannot show existing process callgraph symbol

PATCH In review [email protected] 1 participant 2 messages Feb 5, 2010 – Feb 8, 2010 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixed: perf cannot show 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.

---
 tools/perf/builtin-record.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/builtin-record.c +1 -1
index 2654253..1d62d2a 100644
@@ -552,7 +552,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);
Signature · 1 line
1.6.1.3
#1 lore raw

[tip:perf/core] perf record: Fix existing process callgraph symbol

Commit-ID:  f7e7ee36757f68778700cde1aaed89e1d23e59fd
Gitweb:     http://git.kernel.org/tip/f7e7ee36757f68778700cde1aaed89e1d23e59fd
Author:     [email protected] <[email protected]>
AuthorDate: Fri, 5 Feb 2010 09:02:42 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 8 Feb 2010 16:55:52 +0100

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.

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]>

---
 tools/perf/builtin-record.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/builtin-record.c +1 -1
index 3ad599b..771533c 100644
@@ -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);