From: Namhyung Kim <namhyung@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
linux-kernel@vger.kernel.org,
"Steven Rostedt \(Red Hat\)" <rostedt@goodmis.org>,
Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>,
"David A. Long" <dave.long@linaro.org>,
yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH -tip v2 1/8] [BUGFIX] perf-probe: Fix to do exit call for symbol maps
Date: Mon, 03 Feb 2014 16:41:43 +0900 [thread overview]
Message-ID: <87iosw3ao8.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20140129091452.22141.36766.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp> (Masami Hiramatsu's message of "Wed, 29 Jan 2014 09:14:52 +0000")
Hi Masami,
On Wed, 29 Jan 2014 09:14:52 +0000, Masami Hiramatsu wrote:
> Some perf-probe commands do symbol_init() but doesn't
> do exit call. This fixes that to call symbol_exit()
> and relase machine if needed.
> This also merges init_vmlinux() and init_user_exec()
> because both of them are doing similar things.
> (init_user_exec() just skips init vmlinux related
> symbol maps)
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> ---
> tools/perf/util/probe-event.c | 110 +++++++++++++++++++++++------------------
> 1 file changed, 61 insertions(+), 49 deletions(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index a8a9b6c..14c649df 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -73,31 +73,35 @@ static char *synthesize_perf_probe_point(struct perf_probe_point *pp);
> static int convert_name_to_addr(struct perf_probe_event *pev,
> const char *exec);
> static void clear_probe_trace_event(struct probe_trace_event *tev);
> -static struct machine machine;
> +static struct machine *host_machine;
>
> /* Initialize symbol maps and path of vmlinux/modules */
> -static int init_vmlinux(void)
> +static int init_symbol_maps(bool user_only)
> {
> int ret;
>
> symbol_conf.sort_by_name = true;
> - if (symbol_conf.vmlinux_name == NULL)
> - symbol_conf.try_vmlinux_path = true;
> - else
> - pr_debug("Use vmlinux: %s\n", symbol_conf.vmlinux_name);
> + if (user_only)
> + symbol_conf.try_vmlinux_path = false;
> + else {
> + if (symbol_conf.vmlinux_name == NULL)
> + symbol_conf.try_vmlinux_path = true;
This looks unnecessary and duplicate since we already have following
code in __cmd_probe().
/*
* Only consider the user's kernel image path if given.
*/
symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name == NULL);
Thanks,
Namhyung
> + else
> + pr_debug("Use vmlinux: %s\n", symbol_conf.vmlinux_name);
> + }
next prev parent reply other threads:[~2014-02-03 7:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 9:14 [PATCH -tip v2 0/8] perf-probe: Updates for handling local functions correctly Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 1/8] [BUGFIX] perf-probe: Fix to do exit call for symbol maps Masami Hiramatsu
2014-02-03 7:41 ` Namhyung Kim [this message]
2014-02-03 8:19 ` Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 2/8] perf-probe: Remove incorrect symbol check for --list Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 3/8] perf-probe: Show in what binaries/modules probes are set Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 4/8] perf-probe: Use _stext based address instead of the symbol name Masami Hiramatsu
2014-02-03 7:49 ` Namhyung Kim
2014-02-03 8:32 ` Masami Hiramatsu
2014-02-04 9:49 ` Masami Hiramatsu
2014-02-04 10:05 ` Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 5/8] perf-probe: Retry to find given address from offline dwarf Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 6/8] perf-probe: Show appropriate symbol for _stext based kprobes Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 7/8] perf-probe: Show source-level or symbol-level info for uprobes Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 8/8] perf-probe: Allow to add events on the local functions Masami Hiramatsu
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=87iosw3ao8.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=acme@ghostprotocols.net \
--cc=dave.long@linaro.org \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yrl.pp-manager.tt@hitachi.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
Powered by JetHome