diff options
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 2d09c29b3a6c..222efb1fc3bd 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -256,7 +256,8 @@ int event__process_task(event_t *self, struct perf_session *session) | |||
256 | return 0; | 256 | return 0; |
257 | } | 257 | } |
258 | 258 | ||
259 | void thread__find_addr_location(struct thread *self, u8 cpumode, | 259 | void thread__find_addr_location(struct thread *self, |
260 | struct perf_session *session, u8 cpumode, | ||
260 | enum map_type type, u64 addr, | 261 | enum map_type type, u64 addr, |
261 | struct addr_location *al, | 262 | struct addr_location *al, |
262 | symbol_filter_t filter) | 263 | symbol_filter_t filter) |
@@ -268,7 +269,7 @@ void thread__find_addr_location(struct thread *self, u8 cpumode, | |||
268 | 269 | ||
269 | if (cpumode & PERF_RECORD_MISC_KERNEL) { | 270 | if (cpumode & PERF_RECORD_MISC_KERNEL) { |
270 | al->level = 'k'; | 271 | al->level = 'k'; |
271 | mg = kmaps; | 272 | mg = &session->kmaps; |
272 | } else if (cpumode & PERF_RECORD_MISC_USER) | 273 | } else if (cpumode & PERF_RECORD_MISC_USER) |
273 | al->level = '.'; | 274 | al->level = '.'; |
274 | else { | 275 | else { |
@@ -289,14 +290,14 @@ try_again: | |||
289 | * "[vdso]" dso, but for now lets use the old trick of looking | 290 | * "[vdso]" dso, but for now lets use the old trick of looking |
290 | * in the whole kernel symbol list. | 291 | * in the whole kernel symbol list. |
291 | */ | 292 | */ |
292 | if ((long long)al->addr < 0 && mg != kmaps) { | 293 | if ((long long)al->addr < 0 && mg != &session->kmaps) { |
293 | mg = kmaps; | 294 | mg = &session->kmaps; |
294 | goto try_again; | 295 | goto try_again; |
295 | } | 296 | } |
296 | al->sym = NULL; | 297 | al->sym = NULL; |
297 | } else { | 298 | } else { |
298 | al->addr = al->map->map_ip(al->map, al->addr); | 299 | al->addr = al->map->map_ip(al->map, al->addr); |
299 | al->sym = map__find_symbol(al->map, al->addr, filter); | 300 | al->sym = map__find_symbol(al->map, session, al->addr, filter); |
300 | } | 301 | } |
301 | } | 302 | } |
302 | 303 | ||
@@ -311,7 +312,7 @@ int event__preprocess_sample(const event_t *self, struct perf_session *session, | |||
311 | 312 | ||
312 | dump_printf(" ... thread: %s:%d\n", thread->comm, thread->pid); | 313 | dump_printf(" ... thread: %s:%d\n", thread->comm, thread->pid); |
313 | 314 | ||
314 | thread__find_addr_location(thread, cpumode, MAP__FUNCTION, | 315 | thread__find_addr_location(thread, session, cpumode, MAP__FUNCTION, |
315 | self->ip.ip, al, filter); | 316 | self->ip.ip, al, filter); |
316 | dump_printf(" ...... dso: %s\n", | 317 | dump_printf(" ...... dso: %s\n", |
317 | al->map ? al->map->dso->long_name : | 318 | al->map ? al->map->dso->long_name : |