[PATCH -tip v2 1/6] [BUGFIX] perf script: print correct IP address

Akihiro Nagai
2011-07-17T09:30:18Z

perf_session_print_ip() prints addr_location->addr as IP address.
It's not always same as IP address. To correct it, this function
must print sample->ip.

Changes in v2:
- add this patch

Signed-off-by: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
---

tools/perf/util/session.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 080e533..453a010 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1263,7 +1263,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;