All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Yicong Yang <yangyicong@huawei.com>
Cc: acme@kernel.org, mark.rutland@arm.com, mingo@redhat.com,
	peterz@infradead.org, irogers@google.com,
	linux-perf-users@vger.kernel.org, linuxarm@huawei.com,
	yangyicong@hisilicon.com, jonathan.cameron@huawei.com,
	shameerali.kolothum.thodi@huawei.com, hejunhao3@huawei.com,
	prime.zeng@hisilicon.com
Subject: Re: [PATCH] perf stat: Display iostat headers correctly
Date: Fri, 16 Aug 2024 10:34:29 -0700	[thread overview]
Message-ID: <Zr-Npc3oKa5juMr3@google.com> (raw)
In-Reply-To: <20240802065800.48774-1-yangyicong@huawei.com>

On Fri, Aug 02, 2024 at 02:58:00PM +0800, Yicong Yang wrote:
> From: Yicong Yang <yangyicong@hisilicon.com>
> 
> Currently we'll only print metric headers for metric leader in
> aggregration mode. This will make `perf iostat` header not shown
> since it'll aggregrated globally but don't have metric events:
> root@ubuntu204:/home/yang/linux/tools/perf# ./perf stat --iostat --timeout 1000
>  Performance counter stats for 'system wide':
>     port
> 0000:00                    0                    0                    0                    0
> 0000:80                    0                    0                    0                    0
> [...]
> 
> Fix this by excluding the iostat in the check of printing metric
> headers. Then we can see the headers:
> root@ubuntu204:/home/yang/linux/tools/perf# ./perf stat --iostat --timeout 1000
>  Performance counter stats for 'system wide':
>     port             Inbound Read(MB)    Inbound Write(MB)    Outbound Read(MB)   Outbound Write(MB)
> 0000:00                    0                    0                    0                    0
> 0000:80                    0                    0                    0                    0
> [...]
> 
> Fixes: 193a9e30207f ("perf stat: Don't display metric header for non-leader uncore events")
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>  tools/perf/util/stat-display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
> index c38bcb6f4c78..ea96e4ebad8c 100644
> --- a/tools/perf/util/stat-display.c
> +++ b/tools/perf/util/stat-display.c
> @@ -1237,7 +1237,8 @@ static void print_metric_headers(struct perf_stat_config *config,
>  
>  	/* Print metrics headers only */
>  	evlist__for_each_entry(evlist, counter) {
> -		if (config->aggr_mode != AGGR_NONE && counter->metric_leader != counter)
> +		if (!config->iostat_run &&
> +		    config->aggr_mode != AGGR_NONE && counter->metric_leader != counter)
>  			continue;
>  
>  		os.evsel = counter;
> -- 
> 2.24.0
> 

  parent reply	other threads:[~2024-08-16 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  6:58 [PATCH] perf stat: Display iostat headers correctly Yicong Yang
2024-08-14  9:31 ` Yicong Yang
2024-08-16 17:34 ` Namhyung Kim [this message]
2024-08-16 22:34   ` Arnaldo Carvalho de Melo

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=Zr-Npc3oKa5juMr3@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=hejunhao3@huawei.com \
    --cc=irogers@google.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=yangyicong@hisilicon.com \
    --cc=yangyicong@huawei.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.