lkml.org 
[lkml]   [2011]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -tip 10/13] [RESEND]perf probe: Warn when more than two lines are given
(2011/06/28 23:15), David Ahern wrote:
>
>
> On 06/27/2011 01:27 AM, Masami Hiramatsu wrote:
>> Print warning which warns only the last specified --line option is valid.
>>
>> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
>> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> Cc: Paul Mackerras <paulus@samba.org>
>> Cc: Ingo Molnar <mingo@elte.hu>
>> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
>> ---
>>
>> tools/perf/builtin-probe.c | 11 ++++++++---
>> 1 files changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
>> index 2c0e64d..4f3460a 100644
>> --- a/tools/perf/builtin-probe.c
>> +++ b/tools/perf/builtin-probe.c
>> @@ -134,10 +134,15 @@ static int opt_show_lines(const struct option *opt __used,
>> {
>> int ret = 0;
>>
>> - if (str)
>> - ret = parse_line_range_desc(str, &params.line_range);
>> - INIT_LIST_HEAD(&params.line_range.line_list);
>> + if (!str)
>> + return 0;
>> +
>> + if (params.show_lines)
>> + pr_warning("Warning: more than two --line option are"
>> + " detected. Only last option is valid.\n");
>
> This detects a second --line option, but your warning suggests two
> --line options are ok. Should that warning be "more than one --line
> option is"

Oops! Right, thank you!

>
>> params.show_lines = true;
>> + ret = parse_line_range_desc(str, &params.line_range);
>> + INIT_LIST_HEAD(&params.line_range.line_list);
>>
>> return ret;
>> }


--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com


\
 
 \ /
  Last update: 2011-06-29 07:17    [W:4.173 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site