linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf c2c: Fix c2c report for empty numa node
@ 2019-02-28 15:37 Ravi Bangoria
  2019-02-28 16:12 ` Jiri Olsa
  0 siblings, 1 reply; 6+ messages in thread
From: Ravi Bangoria @ 2019-02-28 15:37 UTC (permalink / raw)
  To: acme
  Cc: alexander.shishkin, jolsa, namhyung, eranian, linux-kernel,
	tonyj, nasastry, Ravi Bangoria

perf c2c report fails if system has empty numa node(0 cpus):

  $ lscpu
  NUMA node0 CPU(s):   
  NUMA node1 CPU(s):   0-4

  $ sudo ./perf c2c report 
  node/cpu topology bugFailed setup nodes

Fix this.

Reported-by: Nageswara R Sastry <nasastry@in.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
---
 tools/perf/util/cpumap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 383674f448fc..517c3f37c613 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -261,7 +261,7 @@ struct cpu_map *cpu_map__dummy_new(void)
 	struct cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int));
 
 	if (cpus != NULL) {
-		cpus->nr = 1;
+		cpus->nr = 0;
 		cpus->map[0] = -1;
 		refcount_set(&cpus->refcnt, 1);
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-02  3:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 15:37 [PATCH] perf c2c: Fix c2c report for empty numa node Ravi Bangoria
2019-02-28 16:12 ` Jiri Olsa
2019-02-28 16:22   ` Jiri Olsa
2019-03-01  7:05     ` Ravi Bangoria
2019-03-01 10:26       ` Jiri Olsa
2019-03-02  3:07         ` Ravi Bangoria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).