From: Ravi Bangoria <[email protected]> If c2c is recorded on a machine where any cpus are offline, 'perf c2c report' throws an error "node/cpu topology bugFailed setup nodes".
It fails because while preparing node-cpu mapping we don't consider offline cpus. Reported-by: Nageswara R Sastry <[email protected]> Signed-off-by: Ravi Bangoria <[email protected]> Acked-by: Jiri Olsa <[email protected]> Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> --- 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 01629f5b6d1f..211143720078 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -2027,7 +2027,7 @@ static int setup_nodes(struct perf_session *session) c2c.node_info = 2; c2c.nodes_cnt = session->header.env.nr_numa_nodes; - c2c.cpus_cnt = session->header.env.nr_cpus_online; + c2c.cpus_cnt = session->header.env.nr_cpus_avail; n = session->header.env.numa_nodes; if (!n) -- 2.21.0

