File perf-c2c-fix-report-with-offline-cpus.patch of Package perf
39
1
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
2
Date: Thu, 22 Aug 2019 14:20:45 +0530
3
Subject: perf c2c: Fix report with offline cpus
4
Git-commit: 1ea770f6c1971bc101b3741f4d88b0b4ea5c4181
5
Patch-mainline: v5.4-rc1
6
References: git-fixes
7
8
If c2c is recorded on a machine where any cpus are offline, 'perf c2c
9
report' throws an error "node/cpu topology bugFailed setup nodes".
10
11
It fails because while preparing node-cpu mapping we don't consider
12
offline cpus.
13
14
Reported-by: Nageswara R Sastry <nasastry@in.ibm.com>
15
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
16
Acked-by: Jiri Olsa <jolsa@kernel.org>
17
Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
18
Link: http://lkml.kernel.org/r/20190822085045.25108-1-ravi.bangoria@linux.ibm.com
19
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
20
Signed-off-by: Tony Jones <tonyj@suse.de>
21
---
22
tools/perf/builtin-c2c.c | 2 +-
23
1 file changed, 1 insertion(+), 1 deletion(-)
24
25
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
26
index 01629f5b6d1f..211143720078 100644
27
--- a/tools/perf/builtin-c2c.c
28
+++ b/tools/perf/builtin-c2c.c
29
30
c2c.node_info = 2;
31
32
c2c.nodes_cnt = session->header.env.nr_numa_nodes;
33
- c2c.cpus_cnt = session->header.env.nr_cpus_online;
34
+ c2c.cpus_cnt = session->header.env.nr_cpus_avail;
35
36
n = session->header.env.numa_nodes;
37
if (!n)
38
39