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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E726C7EE2C for ; Fri, 25 Aug 2023 14:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231326AbjHYOqe (ORCPT ); Fri, 25 Aug 2023 10:46:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240257AbjHYOq0 (ORCPT ); Fri, 25 Aug 2023 10:46:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D4CA2109; Fri, 25 Aug 2023 07:46:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2A5A0622A2; Fri, 25 Aug 2023 14:46:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 533A5C433C8; Fri, 25 Aug 2023 14:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692974783; bh=RId/5/iXShBVctnrrr6Y2T9OzHSw2h2nMjzM8MonGHU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=htCCQYUD30K7SwzsDohB/EpP+awpuWjKtGzxStaBNcvt7J8XtL7wKMOOVOv9aufd5 GeA9ROiqIhgOE/izPFtjmKdO1eVsL0V4xzrnrVoqcdaMH3fw2eYJj5dXxBD+RqpfHY 4/cFON8CIvDNd18NAHZYMXtP66R1eyaJpLm2v4xZjFkojNbUtRnijtYZNOprkDaNBL txEcPfupPcz3MEaNF0BiSAgbYM1aFMKMP73/RVjIt7HRa6F46cFuMN5ofQOfJwIlXX +h2n4SYTRxEJK6+Zcg07VF7+Kf4rb1pDiPkrOrLvj1TqgN6g98mcFDCwVvgRg5zb8L +XfOgMU+ZSufg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 516C140722; Fri, 25 Aug 2023 11:46:20 -0300 (-03) Date: Fri, 25 Aug 2023 11:46:20 -0300 From: Arnaldo Carvalho de Melo To: "Liang, Kan" Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Ravi Bangoria , Kajol Jain , John Garry , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/2] perf list: Remove duplicate PMUs Message-ID: References: <20230825135237.921058-1-irogers@google.com> <166e2aad-5e17-3ffa-b140-05f174583ab2@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <166e2aad-5e17-3ffa-b140-05f174583ab2@linux.intel.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Fri, Aug 25, 2023 at 10:05:46AM -0400, Liang, Kan escreveu: > On 2023-08-25 9:52 a.m., Ian Rogers wrote: > > When there are multiple PMUs, differing by ordered suffixes, by > > default only display one. This avoids repeated listing of events, in > > particular when there are 10s of uncore PMUs. If "-v" is passed to > > "perf list" then still list all PMUs. > > > > Listing fewer PMU/event combinations helps speed the all PMU event > > tests. > > > > Before: > > ``` > > $ perf list > > ... > > uncore_imc_free_running_0/data_read/ [Kernel PMU event] > > uncore_imc_free_running_0/data_total/ [Kernel PMU event] > > uncore_imc_free_running_0/data_write/ [Kernel PMU event] > > uncore_imc_free_running_1/data_read/ [Kernel PMU event] > > uncore_imc_free_running_1/data_total/ [Kernel PMU event] > > uncore_imc_free_running_1/data_write/ [Kernel PMU event] > > ``` > > > > After: > > ``` > > $ perf list > > ... > > uncore_imc_free_running/data_read/ [Kernel PMU event] > > uncore_imc_free_running/data_total/ [Kernel PMU event] > > uncore_imc_free_running/data_write/ [Kernel PMU event] > > ... > > $ perf list -v > > ... > > uncore_imc_free_running_0/data_read/ [Kernel PMU event] > > uncore_imc_free_running_0/data_total/ [Kernel PMU event] > > uncore_imc_free_running_0/data_write/ [Kernel PMU event] > > uncore_imc_free_running_1/data_read/ [Kernel PMU event] > > uncore_imc_free_running_1/data_total/ [Kernel PMU event] > > uncore_imc_free_running_1/data_write/ [Kernel PMU event] > > ... > > ``` > > > > The PMUs are sorted by name then suffix as a part of this change. > > > > v5: Improved the 2nd patch's commit message and removed an unused > > variable as suggested by Kan Liang . > > v4: Rebase on top of lazy PMU changes. Ignore numeric ordering due to > > gaps, suggested by Kan Liang . Fold > > patches 2 & 3 as suggested by John Garry > > (done by accident as part of rebasing). > > v3: Add detail to patch 1 sorting commit message about the suffix and > > why sorting is necessary. > > v2: List all PMUs when "-v" is passed as suggested by John Garry > > . > > > > Ian Rogers (2): > > perf pmus: Sort pmus by name then suffix > > perf pmus: Skip duplicate PMUs and don't print list suffix by default > > > Reviewed-by: Kan Liang Thanks, applied. - Arnaldo