[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120911092026.GU8285@erda.amd.com>
Date: Tue, 11 Sep 2012 11:20:26 +0200
From: Robert Richter <robert.richter@....com>
To: David Ahern <dsahern@...il.com>
CC: <acme@...stprotocols.net>, <linux-kernel@...r.kernel.org>,
<peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 3/3] perf tool: give user better message if precise is
not supported
On 10.09.12 10:40:16, David Ahern wrote:
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -294,6 +294,11 @@ try_again:
> perf_evsel__name(pos));
> rc = -err;
> goto out;
> + } else if ((err == ENOTSUP) && (attr->precise_ip)) {
It is EOPNOTSUPP, did you test this?
> + ui__error("\'precise\' request not supported. "
> + "Try removing 'p' modifier\n");
I would better print "... request may not be supported.", since you
don't know for sure if this is the real cause.
> + rc = -err;
> + goto out;
> }
>
> printf("\n");
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index 0513aaa..0d3653b 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -975,6 +975,10 @@ try_again:
> ui__error("Too many events are opened.\n"
> "Try again after reducing the number of events\n");
> goto out_err;
> + } else if ((err == ENOTSUP) && (attr->precise_ip)) {
> + ui__error("\'precise\' request not supported. "
> + "Try removing 'p' modifier\n");
Same here.
> + goto out_err;
To avoid adding more duplicate code, maybe we should start to unify
the code by implementing this in a shared helper function.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
--
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