linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Ravi Bangoria <ravi.bangoria@linux.ibm.com>,
	Nageswara R Sastry <nasastry@in.ibm.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 24/25] perf c2c: Fix report with offline cpus
Date: Thu, 22 Aug 2019 18:00:59 -0300	[thread overview]
Message-ID: <20190822210100.3461-25-acme@kernel.org> (raw)
In-Reply-To: <20190822210100.3461-1-acme@kernel.org>

From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>

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 <nasastry@in.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
Link: http://lkml.kernel.org/r/20190822085045.25108-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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


  parent reply	other threads:[~2019-08-22 21:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 21:00 [GIT PULL] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 01/25] tools headers: Add missing perf_event.h include Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 02/25] perf tools: Use perf_cpu_map__nr instead of cpu_map__nr Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 03/25] libperf: Move perf's cpu_map__empty() to perf_cpu_map__empty() Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 04/25] libperf: Move perf's cpu_map__idx() to perf_cpu_map__idx() Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 05/25] perf arm64: Add missing debug.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 06/25] perf kvm s390: Add missing string.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 07/25] perf metricgroup: Remove needless includes from metricgroup.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 08/25] perf evsel: Move xyarray.h from evsel.c to evsel.h to reduce include dep tree Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 09/25] perf counts: Add missing headers needed for types used Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 10/25] perf bpf: Add missing xyarray.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 11/25] perf evlist: " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 12/25] perf script: Add missing counts.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 13/25] perf tests: " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 14/25] perf stat: " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 15/25] perf scripting python: Add missing counts.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 16/25] perf evsel: Add missing perf/evsel.h header in util/evsel.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 17/25] perf evsel: Remove needless counts.h header from util/evsel.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 18/25] perf evsel: Remove needless stddef.h " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 19/25] perf evsel: util/evsel.h needs stdio.h as it uses FILE Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 20/25] perf x86 kvm-stat: Add missing string.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 21/25] perf evsel: Switch to libperf's cpumap.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 22/25] perf cpumap: Remove needless includes from cpumap.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 23/25] libperf: Add perf_thread_map__nr/perf_thread_map__pid functions Arnaldo Carvalho de Melo
2019-08-22 21:00 ` Arnaldo Carvalho de Melo [this message]
2019-08-22 21:01 ` [PATCH 25/25] libperf: Fix alignment trap with xyarray contents in 'perf stat' Arnaldo Carvalho de Melo
2019-08-23 10:30 ` [GIT PULL] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190822210100.3461-25-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=nasastry@in.ibm.com \
    --cc=ravi.bangoria@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).