Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1488054rwi; Mon, 10 Oct 2022 17:39:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7WJ4ToGlDLa8D331Fovs/wJGfKBvoOkaH5h2IDsqIibjUvlGhRJIKIAmGfplRjSJ0oC5hR X-Received: by 2002:a17:907:2d06:b0:78d:50db:130e with SMTP id gs6-20020a1709072d0600b0078d50db130emr15744307ejc.371.1665448784276; Mon, 10 Oct 2022 17:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665448784; cv=none; d=google.com; s=arc-20160816; b=o0rhRY6ycQ+fHlOIghyKw7xhwveVEeePTlqyEajA8C/rkQqbzyfSgt03ScbKZ6EKs5 bPjf4WIhgZ0mgyX7jYe/EqJkUbnv6BYJH29DtjydPqk5YSAI02KJPdF0CXUXCyPtNb// cSLTWn8Z0Zi6eOu3m2akyBbNUNF9cNAFKHKS6vdhG0qUNMcSBCLj2EwE6KVX88HS7+dA Im8rFbhsPi64MJ7JWeOgJt0P59EG85vz+Qd7TSjU2Bj33i2GsAUVr0Sm3aQ0hS9JCSV/ QQ22qhW0y6sJ845sh84hmViLgQ4vX2lMDDZt/arN8Tx8DsNA/WlWN4DBU0oqdUM9ahTv r9kg== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DrdYFmtGbe5gN8/aCjpN+8SpMF/YiUrtWiaD+pk/ges=; b=sfOJDb0R/NpNr4ORe+moq0JONNR4kU6K9o+EktuZ9oxEyVqg4iHGpp89ZbXsaa30LB 52pybnUIxmnbp16RgN79xwvv6eJQArA2eVmInsmjZrPaFh1IR51G1mK4sqnaedFPoBkH 8zpU0G1dLSRSV5DYTzfqap94v06jweiUV29RkjAOG2/6QZSH4FtZ0U7JRq1RU9IHfBH4 GVmqkaWeFtUxaTgVAfc5KCC4LxgvRMbZwlcUKPsiVobVRTZapqA4erpgX4kshokKMCvG JnrpmuNn4/HAZdW+dsEakYrJ4sqvTgVyVQ1yjoAu07fQ62CUl4pnm17SwAuub9gprqNO sHJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZYLV5DL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz15-20020a0564021d4f00b00450fd95d41esi14474516edb.341.2022.10.10.17.39.19; Mon, 10 Oct 2022 17:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZYLV5DL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbiJKAZ3 (ORCPT + 99 others); Mon, 10 Oct 2022 20:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiJKAZ1 (ORCPT ); Mon, 10 Oct 2022 20:25:27 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37EFC1EAC5; Mon, 10 Oct 2022 17:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665447926; x=1696983926; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Hi/39ZWjxqkQ6aMFAuB2tPrMoMeUZtt47pv6m/lcuTc=; b=EZYLV5DLC9HGFBldfehzuS6RixO4N7wfpg1RBo86LR+FW/FL0jdEyEig RzhNsBEG9vCKeZ3uEm2odNlmae4vvlqtZ1riwr5OxVxM9EBthXBkISIZd RK8rcMbQ5jfifSPn3UZTd9EyT7xCx51yCa+uKx35wEI4pE9KrZVpXiWo6 yyEJnZvgkudscRfcumF6lNELDPeKJNWO0FNnS8r8tOoN9QB1eIsoxGcIK 0DqI3pTILzkurENmGRfUiySnyv5RNJyS7uk0rz3pphHlwR7tYyRi4iRqn WjxNxHT9fGlfX7KxJJC07KTpd1f01sWdS2xr5njWTUy6axE/EBF0hv9tl A==; X-IronPort-AV: E=McAfee;i="6500,9779,10496"; a="303106782" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="303106782" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2022 17:25:26 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10496"; a="689010780" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="689010780" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.62.34]) ([10.212.62.34]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2022 17:25:21 -0700 Message-ID: Date: Mon, 10 Oct 2022 20:25:16 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [RFC/PATCHSET 00/19] perf stat: Cleanup counter aggregation (v1) To: Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Kan Liang , Leo Yan , Athira Rajeev , James Clark , Xing Zhengjun References: <20221010053600.272854-1-namhyung@kernel.org> Content-Language: en-US From: Andi Kleen In-Reply-To: <20221010053600.272854-1-namhyung@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 10/10/2022 10:35 PM, Namhyung Kim wrote: > Hello, > > Current perf stat code is somewhat hard to follow since it handles > many combinations of PMUs/events for given display and aggregation > options. This is my attempt to clean it up a little. ;-) My main concern would be subtle regressions since there are so many different combinations and way to travel through the code, and a lot of things are not covered by unit tests. When I worked on the code it was difficult to keep it all working. I assume you have some way to enumerate them all and tested that the output is identical? -Andi