Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1880650ybl; Thu, 15 Aug 2019 02:51:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGEUDKRMrQp1WrcKMripKL7xAJVfjfY8I5IATK23mE6E6jyQnJj7PFq3yruTblXYsB2kXt X-Received: by 2002:a17:902:244:: with SMTP id 62mr3487461plc.243.1565862677381; Thu, 15 Aug 2019 02:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565862677; cv=none; d=google.com; s=arc-20160816; b=ztDVyJRtO+3nca6RvlgdPYPH7SsCSCawjhaC/4N+CCPDnyubVC98Yj3Up/JL8Elu25 yTktfYD1CM0TKfinW+83WytcIGAIv4SirKvHgyivmtcTrxZQl+oX/dhoLJmtkYDQQIoD p2y3uYz+tYwYexWmDl7ZMZb+zvvVH0m9bR/4vg7ntJKghWt+cW/x5x+FTSfoFX1H/ZJZ q8WusVD6WzvQtjTJhzge2jG5SO34aEluqX0tXiAKjHUqfIqmJvy9TF1mVw1MnNqx68BZ GYFN2r+52eQteLFOdl3LLqoGw4U1ABwKdN1sGz2bpVxN3ERDarDrH8XukxYUHSndK27B nS+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=0yPQC3co021hKgcA2DD+PLYhcMZQw49ORGdECLLy2fw=; b=1Dq8gYJrfZy8ZQpuhEzCH/8qsDhgq1xznCQ5C01f4W3F2daIHjOwPGXZOzHq8YHOh6 jd1y+V9L80MJDahA28H3o/VD01Q40UyQUcSpHuAM2xi9LFj2cn7R9OMUsmR+EXDh3z/V vkYVR9IaImDEhmOpLceGDx78fMfAkbk4uL4vkYsi6VS9jphzpy3CgDguR8Fpql0K2nKA HjGF39pt+64aM1dCq1KcUXOsZ3ioxo4G6zDTZMPpiqTa3y241WGdLkHIJp4bgv/npYEr VMgHtpTqFrLYxKxOwcJa1EhO7PoKKoP9qrjHjDo6GbH9S3jg0Q/Z/GPn8cD9eOVr0mSU m4+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=Ju5undD5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si1510447pgi.563.2019.08.15.02.51.01; Thu, 15 Aug 2019 02:51:17 -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; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=Ju5undD5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731473AbfHOJh4 (ORCPT + 99 others); Thu, 15 Aug 2019 05:37:56 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60329 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730464AbfHOJhz (ORCPT ); Thu, 15 Aug 2019 05:37:55 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x7F9Zx182275131 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 15 Aug 2019 02:35:59 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x7F9Zx182275131 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1565861760; bh=0yPQC3co021hKgcA2DD+PLYhcMZQw49ORGdECLLy2fw=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=Ju5undD56dOGsIXNNF5/34biLIQXFdzFK72e6vS6s5vbcDpxTr90fLsngPQTckMyN 00ZtujXA6cLlxnZbxu8cewf1JPo7NovXF7XhiFSU3eK7u+HsQZSriofn0kUhTr1zK/ tqLp7bb2gea/5HtpFJOA3tiPwCL9cDhWT1uWV/gDC35/z0qmjHLjMv2ns3ezoa22Gg JpCx2P1LReKkNrWkaixFUhzKqdwjeZoe2mC90gPEPPVwyAFIzoLr1WQPU4yOv4GbQP QXBT4aYKLY0ybHqXbqnVHeXv3HOteipxqki0tYiWn7oiC/PmbxYtM591RNLM0+wXK8 HFfGh2Zi/vorw== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x7F9ZxBQ2275127; Thu, 15 Aug 2019 02:35:59 -0700 Date: Thu, 15 Aug 2019 02:35:59 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Tan Xiaojun Message-ID: Cc: peterz@infradead.org, alexander.shishkin@linux.intel.com, alexey.budankov@linux.intel.com, rostedt@goodmis.org, tglx@linutronix.de, tanxiaojun@huawei.com, mingo@kernel.org, namhyung@kernel.org, jolsa@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org, tz.stoyanov@gmail.com, kan.liang@linux.intel.com, songliubraving@fb.com, hpa@zytor.com Reply-To: kan.liang@linux.intel.com, tz.stoyanov@gmail.com, acme@redhat.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, namhyung@kernel.org, tanxiaojun@huawei.com, mingo@kernel.org, rostedt@goodmis.org, tglx@linutronix.de, alexey.budankov@linux.intel.com, peterz@infradead.org, alexander.shishkin@linux.intel.com, hpa@zytor.com, songliubraving@fb.com In-Reply-To: <1564717737-21602-1-git-send-email-tanxiaojun@huawei.com> References: <1564717737-21602-1-git-send-email-tanxiaojun@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf record: Support aarch64 random socket_id assignment Git-Commit-ID: 0a4d8fb229dd78f9e0752817339e19e903b37a60 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=1.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0a4d8fb229dd78f9e0752817339e19e903b37a60 Gitweb: https://git.kernel.org/tip/0a4d8fb229dd78f9e0752817339e19e903b37a60 Author: Tan Xiaojun AuthorDate: Fri, 2 Aug 2019 11:48:57 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 14 Aug 2019 11:00:00 -0300 perf record: Support aarch64 random socket_id assignment Same as in 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 Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Steven Rostedt (VMware) Cc: Tzvetomir Stoyanov (VMware) Link: http://lkml.kernel.org/r/1564717737-21602-1-git-send-email-tanxiaojun@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 b04c2b6b28b3..1f2965a07bef 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2252,8 +2252,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++) {