Skip to contentSkip to conversation

perf script: fix display of IP address for non-callchain path

PATCH In review David Ahern 2 participants 3 messages May 30, 2011 – Jul 21, 2011 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf script: fix display of IP address for non-callchain path

Non-callchain path is using al.addr which prints as:
openssl 14564 17672.003587: 7862d _x86_64_AES_encrypt_compact

This should be sample->ip to print as:
openssl 14564 17672.003587: 3f7867862d _x86_64_AES_encrypt_compact

---
 tools/perf/util/session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/session.c +1 -1
index e6cf0e2..360d8c4 100644
@@ -1247,7 +1247,7 @@ void perf_session__print_ip(union perf_event *event,
 		}
 
 	} else {
-		printf("%16" PRIx64, al.addr);
+		printf("%16" PRIx64, sample->ip);
 		if (print_sym) {
 			if (al.sym && al.sym->name)
 				symname = al.sym->name;
Signature · 1 line
1.7.5.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · David Ahern

Non-callchain path is using al.addr which prints as:
openssl 14564 17672.003587: 7862d _x86_64_AES_encrypt_compact

This should be sample->ip to print as:
openssl 14564 17672.003587: 3f7867862d _x86_64_AES_encrypt_compact

Quoted 20 lines
---
 tools/perf/util/session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/session.c +1 -1
index e6cf0e2..360d8c4 100644
@@ -1247,7 +1247,7 @@ void perf_session__print_ip(union perf_event *event,
 		}
 
 	} else {
-		printf("%16" PRIx64, al.addr);
+		printf("%16" PRIx64, sample->ip);
 		if (print_sym) {
 			if (al.sym && al.sym->name)
 				symname = al.sym->name;
Signature · 1 line
1.7.5.2
#2 lore raw

[tip:perf/core] perf script: Fix display of IP address for non-callchain path

In reply to David Ahern
Commit-ID:  adc4bf9955856f8aa081ba613dbf56ffd664f0b7
Gitweb:     http://git.kernel.org/tip/adc4bf9955856f8aa081ba613dbf56ffd664f0b7
Author:     David Ahern <[email protected]>
AuthorDate: Mon, 30 May 2011 09:16:27 -0600
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 21 Jul 2011 10:09:28 +0200

perf script: Fix display of IP address for non-callchain path

Non-callchain path is using al.addr which prints as:
openssl 14564 17672.003587: 7862d _x86_64_AES_encrypt_compact

This should be sample->ip to print as:
openssl 14564 17672.003587: 3f7867862d _x86_64_AES_encrypt_compact

---
 tools/perf/util/session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/session.c +1 -1
index a3c13bc..72458d9 100644
@@ -1269,7 +1269,7 @@ void perf_session__print_ip(union perf_event *event,
 		}
 
 	} else {
-		printf("%16" PRIx64, al.addr);
+		printf("%16" PRIx64, sample->ip);
 		if (print_sym) {
 			if (al.sym && al.sym->name)
 				symname = al.sym->name;