Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp292669ybh; Fri, 2 Aug 2019 23:27:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkWSv2wpUhKdOWv/KifWOrMN4Kg/SUyt51UsmkTtfzfENfR3jPMmP0pUKpbg42DBT83VqJ X-Received: by 2002:a17:90a:cb97:: with SMTP id a23mr7741967pju.67.1564813648207; Fri, 02 Aug 2019 23:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564813648; cv=none; d=google.com; s=arc-20160816; b=kKm4mXlilSntr83zsgPLGxU44c5pmnjgefdGR8alhzzYFOjyoiCnjoxVkT6qHkCoAn 9v3X+V/srN+uOIsM3JKFy+n9tS3ARyRuFdi2ip9tSc27WC3AU38AgLvYuyhnFnA1AENb jxSIg8Rj1o6IOqo82Jj8ycbhUBoNj14iLilTyjxUfgwUSMWzd8WOxGTEEPNglueayNur TD1SABat5iG+Jp60mdfX3WyO1qNULVQZelpyHqqLSO6t+zhHC4/SBW9pgp0MduiAiizr d0f93zPLmJKF/SQ5dBFp0rXbzOHBiyXNt2QYJJzXdUuGrHUd2IlA4Q8Lv8IovT8Pfmfy NELA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7eIM3UGPQ4CFY9yADqykXQv+sF1khBkQdXmUU90C+8Y=; b=D8aH+FApT64FIXt7Dg3gaKW1xJCGj+pp4yRlvWuVI6YcAsXkionnqcE2b8wEn97c2i ridvXNta01xOFoSt8uDkEOvScUm4Iml18FYhnMHbmZb2WwEzTs+UGQis7hSnEuBOXY87 iP+Rwh7CUkYM2hO3c9r55YMeFF7CglB9deyOkbdBatUQaXj58kRdSbJStU2k5S7mQ3d/ sd7JzcVvB4BovoDywOYh5WGSmMDa8E6O5QgqBea6oP1FIt818OK2L5tZvCxq4OY9m0mM tB+GdR/4mfqcvZhWs7+KKcFKZWMv9FJBmq6ljKrW1OdyGA+ugS1hKVrDZFBK8vhG3yhn 2HCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h63si8053248pjb.106.2019.08.02.23.27.12; Fri, 02 Aug 2019 23:27:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392960AbfHBNJb (ORCPT + 99 others); Fri, 2 Aug 2019 09:09:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48538 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389781AbfHBNJa (ORCPT ); Fri, 2 Aug 2019 09:09:30 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33C6F3082E20; Fri, 2 Aug 2019 13:09:30 +0000 (UTC) Received: from krava (ovpn-204-20.brq.redhat.com [10.40.204.20]) by smtp.corp.redhat.com (Postfix) with SMTP id B3F02600C8; Fri, 2 Aug 2019 13:09:27 +0000 (UTC) Date: Fri, 2 Aug 2019 15:09:26 +0200 From: Jiri Olsa To: Tan Xiaojun Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, namhyung@kernel.org, songliubraving@fb.com, rostedt@goodmis.org, kan.liang@linux.intel.com, tz.stoyanov@gmail.com, alexey.budankov@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf record: Support aarch64 random socket_id assignment Message-ID: <20190802130926.GB27223@krava> References: <1564717737-21602-1-git-send-email-tanxiaojun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1564717737-21602-1-git-send-email-tanxiaojun@huawei.com> User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 02 Aug 2019 13:09:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 11:48:57AM +0800, Tan Xiaojun wrote: > Same as the commit 01766229533f ("perf record: Support s390 random > socket_id assignment"), aarch64 also have this problem. > > Without this fix: > [root@localhost perf]# ./perf report --header -I -v > ... > socket_id number is too big.You may need to upgrade the perf tool. > > # ======== > # captured on : Thu Aug 1 22:58:38 2019 > # header version : 1 > ... > # Core ID and Socket ID information is not available > ... > > With this fix: > [root@localhost perf]# ./perf report --header -I -v > ... > cpumask list: 0-31 > cpumask list: 32-63 > cpumask list: 64-95 > cpumask list: 96-127 > > # ======== > # captured on : Thu Aug 1 22:58:38 2019 > # header version : 1 > ... > # CPU 0: Core ID 0, Socket ID 36 > # CPU 1: Core ID 1, Socket ID 36 > ... > # CPU 126: Core ID 126, Socket ID 8442 > # CPU 127: Core ID 127, Socket ID 8442 > ... > > Signed-off-by: Tan Xiaojun Acked-by: Jiri Olsa thanks, jirka > --- > tools/perf/util/header.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > index 20111f8..d57fb74 100644 > --- a/tools/perf/util/header.c > +++ b/tools/perf/util/header.c > @@ -2251,8 +2251,10 @@ static int process_cpu_topology(struct feat_fd *ff, void *data __maybe_unused) > /* On s390 the socket_id number is not related to the numbers of cpus. > * The socket_id number might be higher than the numbers of cpus. > * This depends on the configuration. > + * AArch64 is the same. > */ > - if (ph->env.arch && !strncmp(ph->env.arch, "s390", 4)) > + if (ph->env.arch && (!strncmp(ph->env.arch, "s390", 4) > + || !strncmp(ph->env.arch, "aarch64", 7))) > do_core_id_test = false; > > for (i = 0; i < (u32)cpu_nr; i++) { > -- > 2.7.4 >