All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Joe Mario <jmario@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Michael Petlan <mpetlan@redhat.com>
Subject: Re: [PATCH] perf c2c: Display proper cpu count in nodes column
Date: Tue, 20 Aug 2019 11:16:52 -0300	[thread overview]
Message-ID: <20190820141652.GG24428@kernel.org> (raw)
In-Reply-To: <20190820140219.28338-1-jolsa@kernel.org>

Em Tue, Aug 20, 2019 at 04:02:19PM +0200, Jiri Olsa escreveu:
> There's wrong bitmap considered when checking
> for cpu count of specific node.
> 
> We do the needed computation for 'set' variable,
> but at the end we use the 'c2c_he->cpuset' weight,
> which shows misleading numbers.
> 
> Reported-by: Joe Mario <jmario@redhat.com>

You forgot to add this:

Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")

Can you please confirm that that is the cset being fixed? This helps
with backporters, stable@, etc.

- Arnaldo


> Link: https://lkml.kernel.org/n/tip-9wvrv74n7d4nbgztr74isv5j@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-c2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index f0aae6e13a33..9240c6bf70f5 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -1106,7 +1106,7 @@ node_entry(struct perf_hpp_fmt *fmt __maybe_unused, struct perf_hpp *hpp,
>  			break;
>  		case 1:
>  		{
> -			int num = bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt);
> +			int num = bitmap_weight(set, c2c.cpus_cnt);
>  			struct c2c_stats *stats = &c2c_he->node_stats[node];
>  
>  			ret = scnprintf(hpp->buf, hpp->size, "%2d{%2d ", node, num);
> -- 
> 2.21.0

-- 

- Arnaldo

  reply	other threads:[~2019-08-20 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 14:02 [PATCH] perf c2c: Display proper cpu count in nodes column Jiri Olsa
2019-08-20 14:16 ` Arnaldo Carvalho de Melo [this message]
2019-08-20 14:21   ` Jiri Olsa
2019-09-02  8:16 ` [tip: perf/core] " tip-bot2 for 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=20190820141652.GG24428@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jmario@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.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 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.