Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp338601ybi; Thu, 1 Aug 2019 20:08:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8XyDJTONDZU8f3JKIK4a2bc51ytGUGZW+y3uvYWYLKbAt0ET2Wnof+4BtZpDhRNSmh3c+ X-Received: by 2002:a63:724b:: with SMTP id c11mr43575882pgn.30.1564715333505; Thu, 01 Aug 2019 20:08:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564715333; cv=none; d=google.com; s=arc-20160816; b=Q7/UqtxqlDVzPSN2gOYVZIO6TJZ8fedk6U0U/r9k67+21Tm8HYJLy5PFqt9Ox8ziXe Z7B1JlidQOGg9JXqmNwB0J3dbt4dlt0F8F+3ujO+mxMymGAGF5pJVUk+1UAXerhDUgVk QkVylyoc+zkCSArShZDTrWnYVYCX/mjvgF8Oxll3DqOwBrLTavyPUKuqx5FDUgIfGszl QCUp20pidhSYrMQ5mCePCswKgAGhElbh4zl0eMwvz9uEnm/5TKXudAzFRENiXun4+wVo ETxfavZB8qEpQB5aAlF7EIp+csKh3GJ4DF9hQ7NhnzVcyqEETL1IrDWF5WA/HbscAPbo l1DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=7icCz3N52HER9X8ka3oztbMqrGM8u6luWNwRWCfElDY=; b=LOOZr4haCaALaRibif5oiC/CWBqJsgTCVgE7DDaHnVHRvJXYK+M0j8e9vCK5/5zUFD mkPldUSV75EGyzltBVavvBl6sj7HBD3QA+MZVYG/by6fyUomPASoynCPzyBc83Smm9nf KKeSvAZh470LFLwD/To8xOdXtB/tHohonr25HziL9afwTEIaRqLRuI36nf+geWXx9eeZ //9CDfYSaxXumIijVUoE4H4o7q4moBhwLTZwJ+vBXrUPdT3rpqw+fBc1W/Z9InKw/fBb k3u9Xu6c9HACH4Sz07SoULh+fkETbU0AQkKsa38DdTSX1rsvhIrCGxfmGCg5dQm+ixeQ G6bg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be3si34172318plb.383.2019.08.01.20.08.37; Thu, 01 Aug 2019 20:08:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727885AbfHBDGP (ORCPT + 99 others); Thu, 1 Aug 2019 23:06:15 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3698 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726467AbfHBDGP (ORCPT ); Thu, 1 Aug 2019 23:06:15 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 0B309FFFDDE6338C5C4F; Fri, 2 Aug 2019 11:06:10 +0800 (CST) Received: from huawei.com (10.175.102.38) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Fri, 2 Aug 2019 11:06:03 +0800 From: Tan Xiaojun To: , , , , , , , , , , CC: , Subject: [PATCH] perf record: Support aarch64 random socket_id assignment Date: Fri, 2 Aug 2019 11:48:57 +0800 Message-ID: <1564717737-21602-1-git-send-email-tanxiaojun@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.38] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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