linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Leo Yan <leo.yan@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joe Mario <jmario@redhat.com>
Subject: Re: [PATCH v2] perf c2c: Use stdio interface if slang is not supported
Date: Thu, 26 May 2022 12:17:39 -0300	[thread overview]
Message-ID: <Yo+aE7dEoKaECHEu@kernel.org> (raw)
In-Reply-To: <20220526145400.611249-1-leo.yan@linaro.org>

Em Thu, May 26, 2022 at 10:54:00PM +0800, Leo Yan escreveu:
> If slang lib is not installed on the system, perf c2c tool disables
> TUI mode and roll back to use stdio mode;  but the flag 'c2c.use_stdio'
> is missed to set true and thus it wrongly applies UI quirks in the
> function ui_quirks().
> 
> This commit forces to use stdio interface if slang is not supported,
> and it can avoid to apply the UI quirks and show the correct metric
> header.
> 
> Before:
> 
> =================================================
>       Shared Cache Line Distribution Pareto
> =================================================
>   -------------------------------------------------------------------------------
>       0        0        0       99        0        0        0      0xaaaac17d6000
>   -------------------------------------------------------------------------------
>     0.00%    0.00%    6.06%    0.00%    0.00%    0.00%   0x20   N/A       0      0xaaaac17c25ac         0         0        43       375    18469         2  [.] 0x00000000000025ac  memstress         memstress[25ac]   0
>     0.00%    0.00%   93.94%    0.00%    0.00%    0.00%   0x29   N/A       0      0xaaaac17c3e88         0         0       173       180      135         2  [.] 0x0000000000003e88  memstress         memstress[3e88]   0
> 
> After:
> 
> =================================================
>       Shared Cache Line Distribution Pareto
> =================================================
>   -------------------------------------------------------------------------------
>       0        0        0       99        0        0        0      0xaaaac17d6000
>   -------------------------------------------------------------------------------
>            0.00%    0.00%    6.06%    0.00%    0.00%    0.00%                0x20   N/A       0      0xaaaac17c25ac         0         0        43       375    18469         2  [.] 0x00000000000025ac  memstress         memstress[25ac]   0
>            0.00%    0.00%   93.94%    0.00%    0.00%    0.00%                0x29   N/A       0      0xaaaac17c3e88         0         0       173       180      135         2  [.] 0x0000000000003e88  memstress         memstress[3e88]   0
> 
> Fixes: 5a1a99cd2e4e ("perf c2c report: Add main TUI browser")
> Reported-by: Joe Mario <jmario@redhat.com>
> Signed-off-by: Leo Yan <leo.yan@linaro.org>

Thanks, applied.

- Arnaldo

> ---
> 
> Changes from v1:
> * Added fixes tag;
> * Added reported tag from Joe.
> 
>  tools/perf/builtin-c2c.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index c8230c48125f..80b525c065ed 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -2801,9 +2801,7 @@ static int perf_c2c__report(int argc, const char **argv)
>  		   "the input file to process"),
>  	OPT_INCR('N', "node-info", &c2c.node_info,
>  		 "show extra node info in report (repeat for more info)"),
> -#ifdef HAVE_SLANG_SUPPORT
>  	OPT_BOOLEAN(0, "stdio", &c2c.use_stdio, "Use the stdio interface"),
> -#endif
>  	OPT_BOOLEAN(0, "stats", &c2c.stats_only,
>  		    "Display only statistic tables (implies --stdio)"),
>  	OPT_BOOLEAN(0, "full-symbols", &c2c.symbol_full,
> @@ -2833,6 +2831,10 @@ static int perf_c2c__report(int argc, const char **argv)
>  	if (argc)
>  		usage_with_options(report_c2c_usage, options);
>  
> +#ifndef HAVE_SLANG_SUPPORT
> +	c2c.use_stdio = true;
> +#endif
> +
>  	if (c2c.stats_only)
>  		c2c.use_stdio = true;
>  
> -- 
> 2.25.1

-- 

- Arnaldo

      reply	other threads:[~2022-05-26 15:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 14:54 [PATCH v2] perf c2c: Use stdio interface if slang is not supported Leo Yan
2022-05-26 15:17 ` Arnaldo Carvalho de Melo [this message]

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=Yo+aE7dEoKaECHEu@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jmario@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).