[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191204152654.GC31283@kernel.org>
Date: Wed, 4 Dec 2019 12:26:54 -0300
From: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Cc: jolsa@...hat.com, kan.liang@...el.com, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
ak@...ux.intel.com, yao.jin@...ux.intel.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] perf hists: Replace pr_err with ui__error
Em Thu, Nov 14, 2019 at 06:52:11PM +0530, Ravi Bangoria escreveu:
> pr_err() in tui mode does not print anyting on the screen and
> just quits. Replace such pr_err with ui__error.
>
> Before:
> $ ./perf report -s +
> $
>
> After:
> $ ./perf report -s +
>
> ┌─Error:────────────────┐
> │Invalid --sort key: `+'│
> │ │
> │Press any key... │
> └───────────────────────┘
Cool, I've seen this before and should have investigated, even today it
happened... Thanks for fixing it, tested and applied.
- Arnaldo
> Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
> ---
> tools/perf/util/sort.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index 43d1d410854a..cba8f22e4ffb 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -2696,12 +2696,12 @@ static int setup_sort_list(struct perf_hpp_list *list, char *str,
> ret = sort_dimension__add(list, tok, evlist, level);
> if (ret == -EINVAL) {
> if (!cacheline_size() && !strncasecmp(tok, "dcacheline", strlen(tok)))
> - pr_err("The \"dcacheline\" --sort key needs to know the cacheline size and it couldn't be determined on this system");
> + ui__error("The \"dcacheline\" --sort key needs to know the cacheline size and it couldn't be determined on this system");
> else
> - pr_err("Invalid --sort key: `%s'", tok);
> + ui__error("Invalid --sort key: `%s'", tok);
> break;
> } else if (ret == -ESRCH) {
> - pr_err("Unknown --sort key: `%s'", tok);
> + ui__error("Unknown --sort key: `%s'", tok);
> break;
> }
> }
> @@ -2758,7 +2758,7 @@ static int setup_sort_order(struct evlist *evlist)
> return 0;
>
> if (sort_order[1] == '\0') {
> - pr_err("Invalid --sort key: `+'");
> + ui__error("Invalid --sort key: `+'");
> return -EINVAL;
> }
>
> @@ -3049,7 +3049,7 @@ static int __setup_output_field(void)
> strp++;
>
> if (!strlen(strp)) {
> - pr_err("Invalid --fields key: `+'");
> + ui__error("Invalid --fields key: `+'");
> goto out;
> }
>
> --
> 2.21.0
--
- Arnaldo
Powered by blists - more mailing lists