From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753951AbbLCXcc (ORCPT ); Thu, 3 Dec 2015 18:32:32 -0500 Received: from e19.ny.us.ibm.com ([129.33.205.209]:55009 "EHLO e19.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753508AbbLCXcb (ORCPT ); Thu, 3 Dec 2015 18:32:31 -0500 X-IBM-Helo: d01dlp01.pok.ibm.com X-IBM-MailFrom: sukadev@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Thu, 3 Dec 2015 15:32:19 -0800 From: Sukadev Bhattiprolu To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , kan.liang@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] perf: Remove 'core_id' check in topo test Message-ID: <20151203233219.GA27696@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15120323-0057-0000-0000-000002B21365 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>From b6bb5d9182f89cd7c6f1eff3cd5a6d3f947b8b0c Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Thu, 3 Dec 2015 18:26:40 -0500 Subject: [PATCH 1/1] perf: Remove 'core_id' check in topo test The topology test case of 'perf test' seems to be broken on my x86 system - due to the comparison of a "core-id" with # of CPUs online. There are 8 online CPUs: $ cat /sys/devices/system/cpu/online 0-7 but core-ids are not sequential and some core-ids exceed the number of online CPUs. $ cat /sys/devices/system/cpu/cpu?/topology/core_id 0 1 9 10 0 1 9 10 Looks like we can safely remove the check. Output before: $ ./perf --version perf version 4.4.rc1.g34258a $ ./perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 5906 templ file: /tmp/perf-test-vCwWG3 core_id number is too big.You may need to upgrade the perf tool. test child interrupted ---- end ---- Test topology in session: FAILED! and after: ./perf test -v topo 36: Test topology in session : --- start --- test child forked, pid 6532 templ file: /tmp/perf-test-y10wFJ CPU 0, core 0, socket 0 CPU 1, core 1, socket 0 CPU 2, core 9, socket 0 CPU 3, core 10, socket 0 CPU 4, core 0, socket 1 CPU 5, core 1, socket 1 CPU 6, core 9, socket 1 CPU 7, core 10, socket 1 test child finished with 0 ---- end ---- Test topology in session: Ok Signed-off-by: Sukadev Bhattiprolu Cc: kan.liang@intel.com Cc: Jiri Olsa --- tools/perf/util/header.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 4383800..e74f94d 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1652,11 +1652,6 @@ static int process_cpu_topology(struct perf_file_section *section, if (ph->needs_swap) nr = bswap_32(nr); - if (nr > (u32)cpu_nr) { - pr_debug("core_id number is too big." - "You may need to upgrade the perf tool.\n"); - goto free_cpu; - } ph->env.cpu[i].core_id = nr; ret = readn(fd, &nr, sizeof(nr)); -- 2.1.0