Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1651808pxb; Wed, 9 Feb 2022 01:14:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJBfTIbULmAXejC8sw36UavVEFvUskGJgVHN0CT3YeX2mGCRDrjTB0myiM1ZCXINr019IT X-Received: by 2002:a05:6a00:240a:: with SMTP id z10mr1262014pfh.68.1644398056476; Wed, 09 Feb 2022 01:14:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644398056; cv=none; d=google.com; s=arc-20160816; b=HE+GFfpYJAGJ+9pIFngep55QozcyWohR7EgNt8hbkdghRMkSRHkVpTMrfG0q29YaUe 7uEPjgGc2pBoUd9ep1gU3xtBEWoErka7wmZXyEUg5bFsFp5uIKEz53jYDNckSEfq3bcj luYzItYdQ2OR1hFMdaa9EK01ch4qkRZV+vURweFwvU00erBbWwd7aTUMrmiNK0j8g1XY tfEgWaPJsYSFei/UOFx6rsAGAvqEOv0dTKTeP53+i25NgEmSLn+6c+yGysFfYq0f+Iel dNRS1SHqdwEbO3n+Xhd9lZHVZq/iUHeGUjDi8gExLRRbCp+tToVOE1ROkfoi2Yo8t8xR AuMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=aS3p3y3q4cbtRBXpt020tOYhnFrQPLyQFoS/b/VwYmU=; b=nxxG8Nwg0DWJYtLnhYL54a5BPK24Fz3RkY641quc+/op2MLiX2H6hAAIClm5noi6kr T5Q1dWfhWXIDmUllqQzAIDyKdlSAuvg2VHHC4lG8eqUY6YhMyNVnSkCrgSvqxIRcXmeL eWOJzsTHOlaD7EbwFoMK7nLU1PcM4w6/Isex+nsXWMJE6Yql9LL3RcVKtHBL+8Xy4ulK KnIs068FdgR3AHKHDy62US+UHDDvA2NT7oIXkijfXSOQS1kaP6d1cj4Pu9K9I7iOuFNC nPFPU0jKHSYiJ+GTBThhYWUwaVYe1yxv1a7FaxwQo3plwBln65ujiU6i+LTXZGKxfznS mzwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s24si14019355plr.179.2022.02.09.01.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:14:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A90E0E02E506; Wed, 9 Feb 2022 00:53:57 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241111AbiBHP72 (ORCPT + 99 others); Tue, 8 Feb 2022 10:59:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381811AbiBHP7X (ORCPT ); Tue, 8 Feb 2022 10:59:23 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 62362C061576; Tue, 8 Feb 2022 07:59:22 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2862C1FB; Tue, 8 Feb 2022 07:59:22 -0800 (PST) Received: from [10.57.36.220] (unknown [10.57.36.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8899D3F70D; Tue, 8 Feb 2022 07:59:20 -0800 (PST) Message-ID: <2d52edc4-c6e6-b641-b291-d1726cc20b30@arm.com> Date: Tue, 8 Feb 2022 15:58:55 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [RFC PATCH v2 0/5] topdown with metrics Content-Language: en-US From: Andrew Kilroy To: John Garry , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org, irogers@google.com, ak@linux.intel.com Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim References: <4fefb1bc-49b2-bc5b-23cd-cd8fabe8c588@huawei.com> <20220111150749.13365-1-andrew.kilroy@arm.com> <7cd7bd11-4900-81c4-de84-6e5fc63ec87c@huawei.com> <1fa70669-146c-7ec6-cee9-4f59751eb334@arm.com> In-Reply-To: <1fa70669-146c-7ec6-cee9-4f59751eb334@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/01/2022 11:42, Andrew Kilroy wrote: > > > On 20/01/2022 09:26, John Garry wrote: >> On 11/01/2022 15:07, Andrew Kilroy wrote: >>> This patch series adds the ability for the --topdown option to use >>> metrics (defined in json files in the pmu-events directory) to describe >>> how to calculate and determine the output columns for topdown level 1. >>> >>> For this to work, a number of metrics have to be defined for the >>> relevant processor with the MetricGroup name "TopDownL1".  perf will >>> arrange for the events defined in each metric to be collected, and each >>> metric will be displayed in the output, as if >>> >>>    perf stat -M 'TopDownL1' --metric-only -- exampleapp >>> >>> had been used. >>> >>> Topdown was already implemented where certain kernel events are defined. >>> If these kernel events are defined, the new json metrics behaviour is >>> not used.  The json metrics approach is only used if the kernel events >>> are absent. >>> >>> The last patch in the series disables the json metrics behaviour on x86. >>> This is because of concerns that due to SMT it's not straightforward to >>> express the various formulas as json for certain x86 cpus.  See >> >> I suppose this solution is ok. >> > > Thanks, would you mind giving it a Reviewed-By? > >> A concern is that today we only have 1x arm64 platform which actually >> supports this in mainline. >> >> Do you have any more which you plan to support? >> > > The Neoverse cores, mainly. > Thanks for the feedback on this RFC, I think we'll resubmit these patches at a later time, when we've got a json metrics file or two. Thanks, Andrew