Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753944AbbKYPRL (ORCPT ); Wed, 25 Nov 2015 10:17:11 -0500 Received: from mga14.intel.com ([192.55.52.115]:11013 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751784AbbKYPRK convert rfc822-to-8bit (ORCPT ); Wed, 25 Nov 2015 10:17:10 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,343,1444719600"; d="scan'208";a="846898790" From: "Liang, Kan" To: Jiri Olsa , Sukadev Bhattiprolu CC: "acme@redhat.com" , "linux-kernel@vger.kernel.org" Subject: RE: perf test topo broken? Thread-Topic: perf test topo broken? Thread-Index: AQHRIxgF373kl8goEEq/EvMuN4MGw56kJG+AgAi8uVA= Date: Wed, 25 Nov 2015 15:16:35 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077019A36D3@SHSMSX103.ccr.corp.intel.com> References: <20151119221353.GA6928@us.ibm.com> <20151120094645.GD897@krava.brq.redhat.com> In-Reply-To: <20151120094645.GD897@krava.brq.redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1763 Lines: 53 > > On Thu, Nov 19, 2015 at 02:13:53PM -0800, Sukadev Bhattiprolu wrote: > > SNIP > > > Commenting out following code seems to cause the test to pass, but are > > core_ids in general related to number of cpus online? > > > > Sukadev > > > > --- > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index > > 4383800..d5104da 100644 > > --- a/tools/perf/util/header.c > > +++ b/tools/perf/util/header.c > > @@ -1652,11 +1652,14 @@ static int process_cpu_topology(struct > perf_file_section *section, > > if (ph->needs_swap) > > nr = bswap_32(nr); > > > > +#if 0 > > if (nr > (u32)cpu_nr) { > > - pr_debug("core_id number is too big." > > - "You may need to upgrade the perf tool.\n"); > > + pr_debug("core_id number is too big. nr %d, cpu_nr %d. " > > + "You may need to upgrade the perf tool.\n", > > + nr, cpu_nr); > > goto free_cpu; > > } > > +#endif > > ph->env.cpu[i].core_id = nr; > > looks like we can safely remove this check, > > I don't see any place we use core_id as array index or any other place > assuming core_id < cpu_nr > > Kan Liang? I assumed that the core_id should be less than max_cpu_number. But in your case it looks the assumption doesn't work. I think we can safely remove the check as Jirka suggested. Thanks, Kan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/