aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-04-27 20:17:50 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-27 20:17:50 -0400
commit23346f21b277e3aae5e9989e711a11cbe8133a45 (patch)
tree21f11a72cf21d4eb3d824f46e274dc8f9815d749 /tools/perf/builtin-top.c
parent462b04e28a7ec1339c892117c3f20a40e55d0e83 (diff)
perf tools: Rename "kernel_info" to "machine"
struct kernel_info and kerninfo__ are too vague, what they really describe are machines, virtual ones or hosts. There are more changes to introduce helpers to shorten function calls and to make more clear what is really being done, but I left that for subsequent patches. Cc: Avi Kivity <avi@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index dfd7ea7dabdd..c390f340b03d 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 dsos__fprintf(&session->machines, 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);