Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1751358rwi; Mon, 10 Oct 2022 23:01:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60n/TtkzxraJWEgxTkFc6+V8EiN858Y65KBtnMX7sEW4t6YX9QKYLDqrew/XwOzek5qYEP X-Received: by 2002:a17:907:8a24:b0:78d:cd60:1022 with SMTP id sc36-20020a1709078a2400b0078dcd601022mr4091866ejc.384.1665468108755; Mon, 10 Oct 2022 23:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665468108; cv=none; d=google.com; s=arc-20160816; b=1CQcVaEeIEmSWfTFSiya2eUvEQde2LQRPF6jdfDYB2agvPbwdVEw4i2g4LiDsAuG2y 7UpHlatgL7QRNJtL+vTlKDunyRL2IBNIWdxen1WtiQZKqeRQFICkVVUEgPhL9yCz/cM5 91avF1omGkwgMnKoC6f1DQYdUeJ9UgptsCRqiipqO9BLGxSrJ/QspzTZS8SUisZRttnW 0kAEmXKUc62kcYo/kr8DALrpazXYOZxbw4SrOC354LFkeOy2QmtYBx0JBmbOyl73Kxta aIt0hmA4S9tCdsA5EiLKdwakrQxUlR++ONd7pZbNNrwh4YYQVCTBE+pE+FlNqHHv1IPQ fyng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=8MO3GTwTzaxtHQ9IWhNQHIjFihMTCSzWT4EomKUbg50=; b=thE/W9Gp2ZL2Wc1EPph1pNIBoryhJ8BWkCM+MPjnLNLFxrgb3cxRp+IySCBpdiNGv2 TxStfDOVeFW4g6xDR9xGgBsi636gN76oO4zLnVwdrD4dbHxLBQZ/y5AmaxRO4AYIVXfV BQADGUDpYPfHFZLMHD5KcyBnjvb7T6k+w6N4lwd0EFYE7GnqFJVVa9+cMFdo6Cx5WM1D rFtIrT/C6dcox3Emgve2vjt1cv417djk7B6wfPfsSZmW0vdWze0Ylx/BXg+vhZCwko8y sb8CEjgUJu0tyn+B9wBuy94W7EDP6dfeM0uU5LWThAiM3O4uSLn1/D1OIc1MIzKdMvdm 71Mg== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020aa7d056000000b00456b734ceebsi11262659edo.436.2022.10.10.23.01.02; Mon, 10 Oct 2022 23:01:48 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229520AbiJKFjA (ORCPT + 99 others); Tue, 11 Oct 2022 01:39:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiJKFi7 (ORCPT ); Tue, 11 Oct 2022 01:38:59 -0400 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851B47B1F7; Mon, 10 Oct 2022 22:38:58 -0700 (PDT) Received: by mail-oi1-f174.google.com with SMTP id x188so5870993oig.5; Mon, 10 Oct 2022 22:38:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8MO3GTwTzaxtHQ9IWhNQHIjFihMTCSzWT4EomKUbg50=; b=1waROP4H5wdaitF77b76xmM2fVm33Fdq5EyVC/hKw73tPalt8fYtA2VqnwCrP9IIq3 p6QwPTHPfFLXh+a/eLJWS9h4b9NGivlS/70OlsHR9I2AkF5asbnvobRq5IHDGzljNemQ WaHjYDvY7zfFaXqZB24vymNpaqs5+iomzF035xjdTkU50LrzuA8SsUYwz9l7M9FksndF u+f5a0Qe4Bf9e78yCwNLj+HKgi93rYs/yIYBvW2SMauHUBoQxNOIgqxaKBPNBHxJmuVE N141wSB7k6EpvK1nNdxVX8JvFH6o00PGrATO/1DMtdU7mbP5j0aaIgdnncE4boUdDEv4 2XSw== X-Gm-Message-State: ACrzQf0zXPtucqQz15qAQLdeiY4IDUvp/OE0LXFwBnFwhaV3CAjoBHpa Exp7bSznzYQTE1b1jN9kupLDyP1wAgxpnohoPo8= X-Received: by 2002:a05:6808:181e:b0:350:e92a:9ab1 with SMTP id bh30-20020a056808181e00b00350e92a9ab1mr10422277oib.209.1665466737685; Mon, 10 Oct 2022 22:38:57 -0700 (PDT) MIME-Version: 1.0 References: <20221010053600.272854-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Mon, 10 Oct 2022 22:38:46 -0700 Message-ID: Subject: Re: [RFC/PATCHSET 00/19] perf stat: Cleanup counter aggregation (v1) To: Andi Kleen Cc: Arnaldo Carvalho de Melo , Jiri Olsa , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 Hi Andi, On Mon, Oct 10, 2022 at 5:25 PM Andi Kleen wrote: > > > 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? Right, that's my concern too. I have tested many combinations manually and checked if they produced similar results. But the problem is that I cannot test all hardwares and more importantly it's hard to check programmatically if the output is the same or not. The numbers vary on each run and sometimes it fluctuates a lot. I don't have good test workloads and the results work for every combination. Any suggestions? Thanks, Namhyung