[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5301F603.8010605@hitachi.com>
Date: Mon, 17 Feb 2014 20:44:03 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org,
"Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
Oleg Nesterov <oleg@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
"David A. Long" <dave.long@...aro.org>,
yrl.pp-manager.tt@...achi.com
Subject: Re: [PATCH -tip v3 01/11] [BUGFIX] perf-probe: Fix to do exit call
for symbol maps
(2014/02/17 16:56), Namhyung Kim wrote:
> Hi Masami,
>
> On Thu, 06 Feb 2014 05:32:04 +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 releases 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)
>>
>> Changes from v2:
>> - Not to set symbol_conf.try_vmlinux_path in init_symbol_maps()
>> (Thanks to Namhyung Kim!)
>>
>> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
>
> [SNIP]
>> -int show_line_range(struct line_range *lr, const char *module)
>> +static int __show_line_range(struct line_range *lr, const char *module)
>> {
>> int l = 1;
>> struct line_node *ln;
>> @@ -573,10 +568,6 @@ int show_line_range(struct line_range *lr, const char *module)
>> char *tmp;
>>
>> /* Search a line range */
>> - ret = init_vmlinux();
>> - if (ret < 0)
>> - return ret;
>> -
>> dinfo = open_debuginfo(module);
>> if (!dinfo) {
>> pr_warning("Failed to open debuginfo file.\n");
>> @@ -646,6 +637,19 @@ end:
>> return ret;
>> }
>>
>> +int show_line_range(struct line_range *lr, const char *module)
>> +{
>> + int ret;
>> +
>> + ret = init_symbol_maps(false);
>> + if (ret < 0)
>> + return ret;
>> + ret = __show_line_range(lr, module);
>> + exit_symbol_maps();
>
> Wouldn't it be better moving init/exit_symbol_maps() to a common
> location if they're used by every operations?
Oh, that's a good idea.:)
Since this just introduces init/exit_symbol_maps() to fix issue
by replacing old one. I think it's better to be done after this series.
Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists