diff options
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index dfd7ea7dabdd..d95281f588d2 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -854,7 +854,7 @@ static void handle_keypress(struct perf_session *session, int c) | |||
854 | case 'Q': | 854 | case 'Q': |
855 | printf("exiting.\n"); | 855 | printf("exiting.\n"); |
856 | if (dump_symtab) | 856 | if (dump_symtab) |
857 | dsos__fprintf(&session->kerninfo_root, stderr); | 857 | perf_session__fprintf_dsos(session, stderr); |
858 | exit(0); | 858 | exit(0); |
859 | case 's': | 859 | case 's': |
860 | prompt_symbol(&sym_filter_entry, "Enter details symbol"); | 860 | prompt_symbol(&sym_filter_entry, "Enter details symbol"); |
@@ -982,7 +982,7 @@ static void event__process_sample(const event_t *self, | |||
982 | u64 ip = self->ip.ip; | 982 | u64 ip = self->ip.ip; |
983 | struct sym_entry *syme; | 983 | struct sym_entry *syme; |
984 | struct addr_location al; | 984 | struct addr_location al; |
985 | struct kernel_info *kerninfo; | 985 | struct machine *machine; |
986 | u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 986 | u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
987 | 987 | ||
988 | ++samples; | 988 | ++samples; |
@@ -992,18 +992,17 @@ static void event__process_sample(const event_t *self, | |||
992 | ++us_samples; | 992 | ++us_samples; |
993 | if (hide_user_symbols) | 993 | if (hide_user_symbols) |
994 | return; | 994 | return; |
995 | kerninfo = kerninfo__findhost(&session->kerninfo_root); | 995 | machine = perf_session__find_host_machine(session); |
996 | break; | 996 | break; |
997 | case PERF_RECORD_MISC_KERNEL: | 997 | case PERF_RECORD_MISC_KERNEL: |
998 | ++kernel_samples; | 998 | ++kernel_samples; |
999 | if (hide_kernel_symbols) | 999 | if (hide_kernel_symbols) |
1000 | return; | 1000 | return; |
1001 | kerninfo = kerninfo__findhost(&session->kerninfo_root); | 1001 | machine = perf_session__find_host_machine(session); |
1002 | break; | 1002 | break; |
1003 | case PERF_RECORD_MISC_GUEST_KERNEL: | 1003 | case PERF_RECORD_MISC_GUEST_KERNEL: |
1004 | ++guest_kernel_samples; | 1004 | ++guest_kernel_samples; |
1005 | kerninfo = kerninfo__find(&session->kerninfo_root, | 1005 | machine = perf_session__find_machine(session, self->ip.pid); |
1006 | self->ip.pid); | ||
1007 | break; | 1006 | break; |
1008 | case PERF_RECORD_MISC_GUEST_USER: | 1007 | case PERF_RECORD_MISC_GUEST_USER: |
1009 | ++guest_us_samples; | 1008 | ++guest_us_samples; |
@@ -1016,7 +1015,7 @@ static void event__process_sample(const event_t *self, | |||
1016 | return; | 1015 | return; |
1017 | } | 1016 | } |
1018 | 1017 | ||
1019 | if (!kerninfo && perf_guest) { | 1018 | if (!machine && perf_guest) { |
1020 | pr_err("Can't find guest [%d]'s kernel information\n", | 1019 | pr_err("Can't find guest [%d]'s kernel information\n", |
1021 | self->ip.pid); | 1020 | self->ip.pid); |
1022 | return; | 1021 | return; |
@@ -1041,7 +1040,7 @@ static void event__process_sample(const event_t *self, | |||
1041 | * --hide-kernel-symbols, even if the user specifies an | 1040 | * --hide-kernel-symbols, even if the user specifies an |
1042 | * invalid --vmlinux ;-) | 1041 | * invalid --vmlinux ;-) |
1043 | */ | 1042 | */ |
1044 | if (al.map == kerninfo->vmlinux_maps[MAP__FUNCTION] && | 1043 | if (al.map == machine->vmlinux_maps[MAP__FUNCTION] && |
1045 | RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) { | 1044 | RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) { |
1046 | pr_err("The %s file can't be used\n", | 1045 | pr_err("The %s file can't be used\n", |
1047 | symbol_conf.vmlinux_name); | 1046 | symbol_conf.vmlinux_name); |