aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-c2c.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-08-20 16:02:19 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-08-29 17:38:31 -0300
commit67260e8c0e681a9bb9ed861514b4c80c2d0eb2e5 (patch)
treecd6f1af62dcfdc330da5e62bae55c31955f241fa /tools/perf/builtin-c2c.c
parentMerge tag 'perf-core-for-mingo-5.4-20190829' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (diff)
downloadlinux-dev-67260e8c0e681a9bb9ed861514b4c80c2d0eb2e5.tar.xz
linux-dev-67260e8c0e681a9bb9ed861514b4c80c2d0eb2e5.zip
perf c2c: Display proper cpu count in nodes column
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. Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key") Reported-by: Joe Mario <jmario@redhat.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20190820140219.28338-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r--tools/perf/builtin-c2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 73782d99ee5a..8335a4076a5a 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -1107,7 +1107,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);