perf c2c: Display proper cpu count in nodes column
Jiri Olsa
reviewerPATCH 1/1 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.
--- tools/perf/builtin-c2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-c2c.c +1 -1
@@ -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);
Signature · 1 line
2.21.0
Em Tue, Aug 20, 2019 at 04:02:19PM +0200, Jiri Olsa escreveu:
Quoted 8 lines
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 <[email protected]>
You forgot to add this:
Can you please confirm that that is the cset being fixed? This helps with backporters, stable@, etc.
- Arnaldo
Quoted 21 lines
Signed-off-by Jiri Olsa <[email protected]>--- tools/perf/builtin-c2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/builtin-c2c.c +1
-1@@ -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);Signature · 1 line
2.21.0
Signature · 1 line
- Arnaldo
Quoted 8 lines · Arnaldo Carvalho de Melo
Em Tue, Aug 20, 2019 at 04:02:19PM +0200, Jiri Olsa escreveu:
Quoted 7 lines
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.
Quoted 8 lines
Quoted 1 line
Reported-by Joe Mario <[email protected]>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.
oops sry, yes, that's correct commit
thanks,
jirka
The following commit has been merged into the perf/core branch of tip:
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 67260e8c0e681a9bb9ed861514b4c80c2d0eb2e5 Gitweb: https://git.kernel.org/tip/67260e8c0e681a9bb9ed861514b4c80c2d0eb2e5 Author: Jiri Olsa <[email protected]> AuthorDate: Tue, 20 Aug 2019 16:02:19 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Thu, 29 Aug 2019 17:38:31 -03:00
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.
--- tools/perf/builtin-c2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-c2c.c +1 -1
@@ -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);