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 DFEFDEB64DA for ; Wed, 19 Jul 2023 14:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbjGSOuU (ORCPT ); Wed, 19 Jul 2023 10:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbjGSOuT (ORCPT ); Wed, 19 Jul 2023 10:50:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20AD8198D; Wed, 19 Jul 2023 07:49:53 -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 4BCDD61724; Wed, 19 Jul 2023 14:49:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FB11C433C8; Wed, 19 Jul 2023 14:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689778190; bh=A3CT326GLyuZ8uG3ETpFiXuusbMwfWFklBzbmRUIMNU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ohnmzcB+bjpNkYJYehCOo+xlvbo0F8MQ8fNKAMyeIRJ4SAiNxuJ7gTBq7w417yBmp kxpXsSV2BgbblTd9/geUEyrtVKItQS5bWsJQJchy03NnSUAWHaGGP55S7w7riek14G zlXYAFXVWshM2W8qUzvievxS3Dq+6+MozfLa20WkfkKweiA84pl3vNNSSh4KEEHz55 Ftk5F37U2hRH3z0SwNCx92i7XhM89j3s+ZTxudWM1lr8cKs9CfEAgOVfCJcus6y51Z WDtPGyGGa0KjpuAD98gBPhZn5azpeA8Ap95izdTEecZnC+TLWZd0lpA+gcPIcsSfR4 KswggLK+8kpIA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 82B1E40516; Wed, 19 Jul 2023 11:49:47 -0300 (-03) Date: Wed, 19 Jul 2023 11:49:47 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Andi Kleen , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Zhengjun Xing , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 0/3] Parse event sort/regroup fixes Message-ID: References: <20230719001836.198363-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719001836.198363-1-irogers@google.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Tue, Jul 18, 2023 at 05:18:33PM -0700, Ian Rogers escreveu: > Patch 1, fix: > perf stat -e cycles,slots,topdown-fe-bound > so that cycles isn't made a group leader (failure caused by PMUs > matching). Previously this event list would fail so not necessarily a > regression over previous perf release. > > Patch 2, when regrouping events the leader needs to be updated due to > sorting. This fix causes larger event groups that then regress at > least the tigerlake metric test as the kernel PMU driver fails to > break the weak groups. This is a fix for a bug but the consequence of > fixing the bug is to make a passing test fail due to the kernel PMU > driver. > > Patch 3, don't alter the list position of events without a group if > they don't need forcing into a group. Analysis showed this was the > cause of the issue reported by Andi Kleen: > https://lore.kernel.org/linux-perf-users/ZLBgbHkbrfGygM%2Fu@tassilo/ Andi, Can you please check these patches and provide a Tested-by? Thanks, - Arnaldo > Due to the test regression in patch 2, follow up patches may be > necessary for Icelake+ Intel vendor metrics to add METRIC_NO_GROUP to > avoid the kernel PMU driver issue. > > Ian Rogers (3): > perf parse-events: Extra care around force grouped events > perf parse-events: When fixing group leaders always set the leader > perf parse-events: Only move force grouped evsels when sorting > > tools/perf/util/parse-events.c | 58 +++++++++++++++++++++------------- > 1 file changed, 36 insertions(+), 22 deletions(-) > > -- > 2.41.0.487.g6d72f3e995-goog