From: tip-bot for Dongsheng Yang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
mingo@redhat.com, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, jolsa@redhat.com, dsahern@gmail.com,
tglx@linutronix.de, yangds.fnst@cn.fujitsu.com
Subject: [tip:perf/core] perf tools: Remove condition in machine__get_kernel_start_addr.
Date: Tue, 10 Dec 2013 01:16:26 -0800 [thread overview]
Message-ID: <tip-2f37573507643407d0a8f38c676ed2e90b795db3@git.kernel.org> (raw)
In-Reply-To: <0a81645dd0b384a12cb4f962cf193ef8c3ce2010.1386197481.git.yangds.fnst@cn.fujitsu.com>
Commit-ID: 2f37573507643407d0a8f38c676ed2e90b795db3
Gitweb: http://git.kernel.org/tip/2f37573507643407d0a8f38c676ed2e90b795db3
Author: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
AuthorDate: Wed, 4 Dec 2013 17:56:39 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 4 Dec 2013 13:46:36 -0300
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>
---
tools/perf/util/machine.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 84cdb07..bac817a 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)
char path[PATH_MAX];
struct process_args args;
- if (machine__is_host(machine)) {
- filename = "/proc/kallsyms";
- } else {
- if (machine__is_default_guest(machine))
- filename = (char *)symbol_conf.default_guest_kallsyms;
- else {
- sprintf(path, "%s/proc/kallsyms", machine->root_dir);
- filename = path;
- }
+ if (machine__is_default_guest(machine))
+ filename = (char *)symbol_conf.default_guest_kallsyms;
+ else {
+ sprintf(path, "%s/proc/kallsyms", machine->root_dir);
+ filename = path;
}
if (symbol__restricted_filename(filename, "/proc/kallsyms"))
next prev parent reply other threads:[~2013-12-10 9:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 22:56 [PATCH 0/5] perf tools: some update for perf tool Dongsheng Yang
2013-12-04 22:56 ` [PATCH 1/5] perf tools: Remove condition in machine__get_kernel_start_addr Dongsheng Yang
2013-12-10 9:16 ` tip-bot for Dongsheng Yang [this message]
2013-12-04 22:56 ` [PATCH 2/5] perf tools: Move the checking of which map function to call into function Dongsheng Yang
2013-12-10 9:16 ` [tip:perf/core] perf target: " tip-bot for Dongsheng Yang
2013-12-04 22:56 ` [PATCH 3/5] perf tools: Update the Document for perf kvm record for new behavior Dongsheng Yang
2013-12-04 14:27 ` Arnaldo Carvalho de Melo
2013-12-05 21:55 ` Dongsheng Yang
2013-12-10 9:17 ` [tip:perf/core] perf kvm: Update the 'record' man page entry for new --guest/--host behavior tip-bot for Dongsheng Yang
2013-12-04 22:56 ` [PATCH 4/5] perf tools: Add more detail about buildid-list in Document of perf-kvm Dongsheng Yang
2013-12-10 9:16 ` [tip:perf/core] perf kvm: Add more detail about buildid-list in man page tip-bot for Dongsheng Yang
2013-12-04 22:56 ` [PATCH 5/5] perf tool: Fix a type of '=' in Document of perf-kvm Dongsheng Yang
2013-12-10 9:16 ` [tip:perf/core] perf kvm: Fix spurious '=' use in man page tip-bot for Dongsheng Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-2f37573507643407d0a8f38c676ed2e90b795db3@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=yangds.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox