From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFE6DC4361A for ; Fri, 4 Dec 2020 11:50:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DBCC22482 for ; Fri, 4 Dec 2020 11:50:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DBCC22482 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MLg7C1R7HD/eK6YkFMg36asHZyFWyhirMnRNA03t8v8=; b=NzZvsokRPITc+KFYMSUkxpbTO dZYXxty2jxmSlXAgULbVlflo1HBrIb8qNTIodxYoAGn+CKe1K1BPcTdXMJpRmCfH+fAsWc7obj1sa n5Cy3f2OlZyaNzvJGOy7bfta47wwHrP6/an9hm41Sn4V7MyPgrk1ox4FT/KTB1ZzRBoUzLb9Y6UJb WEpBuRJyY42H533XkaTCzBLjeRYWE10twGLaAc1MKssF/pwSTGSHVe7DlhY6W4zFWujYJkzq1YmeV ZTZZ7eS7bvNmp8lBTjS2QHLf/26SWL+f4QQA1EK7YdYFiehu5GsO2Wqw9ADH5r+CWeGJ31UHMoBzI IT43NMH5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl9aR-0002ES-1p; Fri, 04 Dec 2020 11:49:19 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl9aN-0002CQ-1V for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2020 11:49:16 +0000 Received: from fraeml710-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4CnWBn2fqhz67L7M; Fri, 4 Dec 2020 19:46:41 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml710-chm.china.huawei.com (10.206.15.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 4 Dec 2020 12:49:07 +0100 Received: from [10.47.5.251] (10.47.5.251) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 4 Dec 2020 11:49:06 +0000 Subject: Re: [PATCH v6 00/12] perf tools: fix perf stat with large socket IDs To: Jiri Olsa , James Clark References: <20201126141328.6509-1-james.clark@arm.com> <20201203153923.GA3613481@krava> From: John Garry Message-ID: <30c4426d-b314-98ff-e6d5-6d5152f316e8@huawei.com> Date: Fri, 4 Dec 2020 11:48:36 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20201203153923.GA3613481@krava> Content-Language: en-US X-Originating-IP: [10.47.5.251] X-ClientProxiedBy: lhreml754-chm.china.huawei.com (10.201.108.204) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_064915_322993_8ADE4486 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-perf-users@vger.kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , Linuxarm Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/12/2020 15:39, Jiri Olsa wrote: + > On Thu, Nov 26, 2020 at 04:13:16PM +0200, James Clark wrote: >> Changes since v5: >> * Fix test for cpu_map__get_die() by shifting id before testing. >> * Fix test for cpu_map__get_socket() by not using cpu_map__id_to_socket() >> which is only valid in CPU aggregation mode. >> >> James Clark (12): >> perf tools: Improve topology test >> perf tools: Use allocator for perf_cpu_map >> perf tools: Add new struct for cpu aggregation >> perf tools: Replace aggregation ID with a struct >> perf tools: add new map type for aggregation >> perf tools: drop in cpu_aggr_map struct >> perf tools: Start using cpu_aggr_id in map >> perf tools: Add separate node member >> perf tools: Add separate socket member >> perf tools: Add separate die member >> perf tools: Add separate core member >> perf tools: Add separate thread member > > Acked-by: Jiri Olsa > Tested-by: John Garry I still think that vendors (like us) need to fix/improve their firmware tables so that we don't get silly big numbers for socket/package IDs, like S5418-D0, below: $./perf stat -a --per-die Performance counter stats for 'system wide': S36-D0 48 72,216.31 msec cpu-clock # 47.933 CPUs utilized S36-D0 48 174 context-switches # 0.002 K/sec S36-D0 48 48 cpu-migrations # 0.001 K/sec S36-D0 48 0 page-faults # 0.000 K/sec S36-D0 48 7,991,698 cycles # 0.000 GHz S36-D0 48 4,750,040 instructions # 0.59 insn per cycle S36-D0 1 branches S36-D0 48 32,928 branch-misses # 0.00% of all branches S5418-D0 48 72,189.54 msec cpu-clock # 47.915 CPUs utilized S5418-D0 48 176 context-switches # 0.002 K/sec S5418-D0 48 48 cpu-migrations # 0.001 K/sec S5418-D0 48 0 page-faults # 0.000 K/sec S5418-D0 48 5,677,218 cycles # 0.000 GHz S5418-D0 48 3,872,285 instructions # 0.68 insn per cycle S5418-D0 1 branches S5418-D0 48 29,208 branch-misses # 0.00% of all branches 1.506615297 seconds time elapsed but at least it works now. Thanks. > >> >> tools/perf/builtin-stat.c | 128 ++++++++++++------------ >> tools/perf/tests/topology.c | 64 ++++++++++-- >> tools/perf/util/cpumap.c | 171 ++++++++++++++++++++++----------- >> tools/perf/util/cpumap.h | 55 ++++++----- >> tools/perf/util/stat-display.c | 102 ++++++++++++-------- >> tools/perf/util/stat.c | 2 +- >> tools/perf/util/stat.h | 9 +- >> 7 files changed, 337 insertions(+), 194 deletions(-) >> >> -- >> 2.28.0 >> > > . > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel