aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>2013-12-04 17:56:39 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-04 11:46:36 -0500
commit2f37573507643407d0a8f38c676ed2e90b795db3 (patch)
treedc1666afdfb0483948ab3b6307e301fb1f31db86 /tools
parente6d7cee1ecac099786d3ba7a71b1e69cf0ae9a7b (diff)
perf tools: Remove condition in machine__get_kernel_start_addr.
In machine__get_kernel_start_addr, the code, which is using machine->root_dir to build filename, works for both host and guests initialized from guestmount, as root_dir is set to "" for the host machine in the machine__init() function. So this patch remove the branch for machine__is_host. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/0a81645dd0b384a12cb4f962cf193ef8c3ce2010.1386197481.git.yangds.fnst@cn.fujitsu.com [ Clarified changeset mentioning root_dir setup in machine__init() ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/machine.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 84cdb072ac83..bac817ab2068 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -502,15 +502,11 @@ static u64 machine__get_kernel_start_addr(struct machine *machine)
502 char path[PATH_MAX]; 502 char path[PATH_MAX];
503 struct process_args args; 503 struct process_args args;
504 504
505 if (machine__is_host(machine)) { 505 if (machine__is_default_guest(machine))
506 filename = "/proc/kallsyms"; 506 filename = (char *)symbol_conf.default_guest_kallsyms;
507 } else { 507 else {
508 if (machine__is_default_guest(machine)) 508 sprintf(path, "%s/proc/kallsyms", machine->root_dir);
509 filename = (char *)symbol_conf.default_guest_kallsyms; 509 filename = path;
510 else {
511 sprintf(path, "%s/proc/kallsyms", machine->root_dir);
512 filename = path;
513 }
514 } 510 }
515 511
516 if (symbol__restricted_filename(filename, "/proc/kallsyms")) 512 if (symbol__restricted_filename(filename, "/proc/kallsyms"))