diff options
Diffstat (limited to 'tools/perf/builtin-kmem.c')
-rw-r--r-- | tools/perf/builtin-kmem.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index ab906cbd5c79..ee05dba9609a 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -352,7 +352,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session, | |||
352 | int n_lines, int is_caller) | 352 | int n_lines, int is_caller) |
353 | { | 353 | { |
354 | struct rb_node *next; | 354 | struct rb_node *next; |
355 | struct kernel_info *kerninfo; | 355 | struct machine *machine; |
356 | 356 | ||
357 | printf("%.102s\n", graph_dotted_line); | 357 | printf("%.102s\n", graph_dotted_line); |
358 | printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr"); | 358 | printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr"); |
@@ -361,8 +361,8 @@ static void __print_result(struct rb_root *root, struct perf_session *session, | |||
361 | 361 | ||
362 | next = rb_first(root); | 362 | next = rb_first(root); |
363 | 363 | ||
364 | kerninfo = kerninfo__findhost(&session->kerninfo_root); | 364 | machine = perf_session__find_host_machine(session); |
365 | if (!kerninfo) { | 365 | if (!machine) { |
366 | pr_err("__print_result: couldn't find kernel information\n"); | 366 | pr_err("__print_result: couldn't find kernel information\n"); |
367 | return; | 367 | return; |
368 | } | 368 | } |
@@ -370,7 +370,6 @@ static void __print_result(struct rb_root *root, struct perf_session *session, | |||
370 | struct alloc_stat *data = rb_entry(next, struct alloc_stat, | 370 | struct alloc_stat *data = rb_entry(next, struct alloc_stat, |
371 | node); | 371 | node); |
372 | struct symbol *sym = NULL; | 372 | struct symbol *sym = NULL; |
373 | struct map_groups *kmaps = &kerninfo->kmaps; | ||
374 | struct map *map; | 373 | struct map *map; |
375 | char buf[BUFSIZ]; | 374 | char buf[BUFSIZ]; |
376 | u64 addr; | 375 | u64 addr; |
@@ -378,8 +377,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session, | |||
378 | if (is_caller) { | 377 | if (is_caller) { |
379 | addr = data->call_site; | 378 | addr = data->call_site; |
380 | if (!raw_ip) | 379 | if (!raw_ip) |
381 | sym = map_groups__find_function(kmaps, addr, | 380 | sym = machine__find_kernel_function(machine, addr, &map, NULL); |
382 | &map, NULL); | ||
383 | } else | 381 | } else |
384 | addr = data->ptr; | 382 | addr = data->ptr; |
385 | 383 | ||