[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E09E21A.8060202@gmail.com>
Date: Tue, 28 Jun 2011 08:15:54 -0600
From: David Ahern <dsahern@...il.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
CC: Steven Rostedt <rostedt@...dmis.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, yrl.pp-manager.tt@...achi.com,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH -tip 10/13] [RESEND]perf probe: Warn when more than two
lines are given
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@...achi.com>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.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, ¶ms.line_range);
> - INIT_LIST_HEAD(¶ms.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"
David
> params.show_lines = true;
> + ret = parse_line_range_desc(str, ¶ms.line_range);
> + INIT_LIST_HEAD(¶ms.line_range.line_list);
>
> return ret;
> }
>
> --
> 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/
--
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