diff options
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 4dcecafa85dc..ba0de90cd3d4 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -254,13 +254,14 @@ void thread__find_addr_location(struct thread *self, u8 cpumode, | |||
254 | struct addr_location *al, | 254 | struct addr_location *al, |
255 | symbol_filter_t filter) | 255 | symbol_filter_t filter) |
256 | { | 256 | { |
257 | struct thread *thread = al->thread = self; | 257 | struct map_groups *mg = &self->mg; |
258 | 258 | ||
259 | al->thread = self; | ||
259 | al->addr = addr; | 260 | al->addr = addr; |
260 | 261 | ||
261 | if (cpumode & PERF_RECORD_MISC_KERNEL) { | 262 | if (cpumode & PERF_RECORD_MISC_KERNEL) { |
262 | al->level = 'k'; | 263 | al->level = 'k'; |
263 | thread = kthread; | 264 | mg = kmaps; |
264 | } else if (cpumode & PERF_RECORD_MISC_USER) | 265 | } else if (cpumode & PERF_RECORD_MISC_USER) |
265 | al->level = '.'; | 266 | al->level = '.'; |
266 | else { | 267 | else { |
@@ -270,7 +271,7 @@ void thread__find_addr_location(struct thread *self, u8 cpumode, | |||
270 | return; | 271 | return; |
271 | } | 272 | } |
272 | try_again: | 273 | try_again: |
273 | al->map = thread__find_map(thread, type, al->addr); | 274 | al->map = map_groups__find(mg, type, al->addr); |
274 | if (al->map == NULL) { | 275 | if (al->map == NULL) { |
275 | /* | 276 | /* |
276 | * If this is outside of all known maps, and is a negative | 277 | * If this is outside of all known maps, and is a negative |
@@ -281,8 +282,8 @@ try_again: | |||
281 | * "[vdso]" dso, but for now lets use the old trick of looking | 282 | * "[vdso]" dso, but for now lets use the old trick of looking |
282 | * in the whole kernel symbol list. | 283 | * in the whole kernel symbol list. |
283 | */ | 284 | */ |
284 | if ((long long)al->addr < 0 && thread != kthread) { | 285 | if ((long long)al->addr < 0 && mg != kmaps) { |
285 | thread = kthread; | 286 | mg = kmaps; |
286 | goto try_again; | 287 | goto try_again; |
287 | } | 288 | } |
288 | al->sym = NULL; | 289 | al->sym = NULL; |