File perf-c2c-display-proper-cpu-count-in-nodes-column.patch of Package perf
42
1
From: Jiri Olsa <jolsa@kernel.org>
2
Date: Tue, 20 Aug 2019 16:02:19 +0200
3
Subject: perf c2c: Display proper cpu count in nodes column
4
Git-commit: 67260e8c0e681a9bb9ed861514b4c80c2d0eb2e5
5
Patch-mainline: v5.4-rc1
6
References: git-fixes
7
8
There's wrong bitmap considered when checking for cpu count of specific
9
node.
10
11
We do the needed computation for 'set' variable, but at the end we use
12
the 'c2c_he->cpuset' weight, which shows misleading numbers.
13
14
Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
15
Reported-by: Joe Mario <jmario@redhat.com>
16
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
17
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
18
Cc: Michael Petlan <mpetlan@redhat.com>
19
Cc: Namhyung Kim <namhyung@kernel.org>
20
Cc: Peter Zijlstra <peterz@infradead.org>
21
Link: http://lore.kernel.org/lkml/20190820140219.28338-1-jolsa@kernel.org
22
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
23
Signed-off-by: Tony Jones <tonyj@suse.de>
24
---
25
tools/perf/builtin-c2c.c | 2 +-
26
1 file changed, 1 insertion(+), 1 deletion(-)
27
28
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
29
index 73782d99ee5a..8335a4076a5a 100644
30
--- a/tools/perf/builtin-c2c.c
31
+++ b/tools/perf/builtin-c2c.c
32
33
break;
34
case 1:
35
{
36
- int num = bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt);
37
+ int num = bitmap_weight(set, c2c.cpus_cnt);
38
struct c2c_stats *stats = &c2c_he->node_stats[node];
39
40
ret = scnprintf(hpp->buf, hpp->size, "%2d{%2d ", node, num);
41
42