From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: jolsa@redhat.com, kan.liang@intel.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, namhyung@kernel.org,
ak@linux.intel.com, yao.jin@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] perf hists: Replace pr_err with ui__error
Date: Wed, 4 Dec 2019 12:26:54 -0300 [thread overview]
Message-ID: <20191204152654.GC31283@kernel.org> (raw)
In-Reply-To: <20191114132213.5419-2-ravi.bangoria@linux.ibm.com>
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
next prev parent reply other threads:[~2019-12-04 15:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 13:22 [PATCH v2 0/3] perf report: Few fixes Ravi Bangoria
2019-11-14 13:22 ` [PATCH v2 1/3] perf hists: Replace pr_err with ui__error Ravi Bangoria
2019-12-04 15:26 ` Arnaldo Carvalho de Melo [this message]
2019-12-06 8:03 ` [tip: perf/urgent] perf report/top TUI: Replace pr_err() with ui__error() tip-bot2 for Ravi Bangoria
2019-11-14 13:22 ` [PATCH v2 2/3] perf report: Make -F more strict like -s Ravi Bangoria
2019-12-06 8:03 ` [tip: perf/urgent] " tip-bot2 for Ravi Bangoria
2019-11-14 13:22 ` [PATCH v2 3/3] perf report: Bail out --mem-mode if mem info is not available Ravi Bangoria
2019-12-06 8:03 ` [tip: perf/urgent] " tip-bot2 for Ravi Bangoria
2019-12-04 10:36 ` [PATCH v2 0/3] perf report: Few fixes Ravi Bangoria
2019-12-04 12:07 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191204152654.GC31283@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=namhyung@kernel.org \
--cc=ravi.bangoria@linux.ibm.com \
--cc=yao.jin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.