lkml.org 
[lkml]   [2019]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@linux.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

\
 
 \ /
  Last update: 2019-12-04 16:27    [W:0.245 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site