From ee23c89759f1c8c1b4fb3ab3887ee11d5e932dc6 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 14 Jan 2010 23:45:29 -0200 Subject: [PATCH] --- yaml --- r: 182372 b: refs/heads/master c: 59ee68ecd1561a233fb6ad351980bea8402533e7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/util/event.c | 26 +++++++++++++++++--------- trunk/tools/perf/util/thread.h | 5 +++++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 208998a19b1c..29f7677f5f9a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 18c3daa4961b9fa1f2db0711d93c0acf0c39fd12 +refs/heads/master: 59ee68ecd1561a233fb6ad351980bea8402533e7 diff --git a/trunk/tools/perf/util/event.c b/trunk/tools/perf/util/event.c index 1abaefc126a8..5a6e827a09eb 100644 --- a/trunk/tools/perf/util/event.c +++ b/trunk/tools/perf/util/event.c @@ -422,11 +422,10 @@ int event__process_task(event_t *self, struct perf_session *session) return 0; } -void thread__find_addr_location(struct thread *self, - struct perf_session *session, u8 cpumode, - enum map_type type, u64 addr, - struct addr_location *al, - symbol_filter_t filter) +void thread__find_addr_map(struct thread *self, + struct perf_session *session, u8 cpumode, + enum map_type type, u64 addr, + struct addr_location *al) { struct map_groups *mg = &self->mg; @@ -441,7 +440,6 @@ void thread__find_addr_location(struct thread *self, else { al->level = 'H'; al->map = NULL; - al->sym = NULL; return; } try_again: @@ -460,11 +458,21 @@ void thread__find_addr_location(struct thread *self, mg = &session->kmaps; goto try_again; } - al->sym = NULL; - } else { + } else al->addr = al->map->map_ip(al->map, al->addr); +} + +void thread__find_addr_location(struct thread *self, + struct perf_session *session, u8 cpumode, + enum map_type type, u64 addr, + struct addr_location *al, + symbol_filter_t filter) +{ + thread__find_addr_map(self, session, cpumode, type, addr, al); + if (al->map != NULL) al->sym = map__find_symbol(al->map, session, al->addr, filter); - } + else + al->sym = NULL; } static void dso__calc_col_width(struct dso *self) diff --git a/trunk/tools/perf/util/thread.h b/trunk/tools/perf/util/thread.h index c06c13535a70..e35653c1817c 100644 --- a/trunk/tools/perf/util/thread.h +++ b/trunk/tools/perf/util/thread.h @@ -48,6 +48,11 @@ static inline struct map *thread__find_map(struct thread *self, return self ? map_groups__find(&self->mg, type, addr) : NULL; } +void thread__find_addr_map(struct thread *self, + struct perf_session *session, u8 cpumode, + enum map_type type, u64 addr, + struct addr_location *al); + void thread__find_addr_location(struct thread *self, struct perf_session *session, u8 cpumode, enum map_type type, u64 addr,