Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3220201rwi; Tue, 11 Oct 2022 21:29:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oFtoNYxcBYzBoeXG8TbOwq30XOWP5jC3oDLoPZaZUOEpoXReM3qsgvNitWzVAgo/4/u4Q X-Received: by 2002:a17:907:7607:b0:78d:66e8:c746 with SMTP id jx7-20020a170907760700b0078d66e8c746mr19860679ejc.220.1665548954262; Tue, 11 Oct 2022 21:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665548954; cv=none; d=google.com; s=arc-20160816; b=NOzBH60c3l5IwoiM3cviRCP0EzC2889JUuLq2HHipGr75j2K0cqeqvnZpBt+pYHQ7a 9S5gHQj8KlQp8AMSer+kM0nwUWT5eMSD3sIXAb9vbFX4nlJHh5CWFr7fzLbgUN6uPMnP poKweN8PvcDgfn04D1gHuJEQzCIhg1KSNPSg5Lg8mXkw8ws+hfgK8pwvuin9Pvtgl7S0 Y6vmWTxCFfaqe9WwQ6r2jUZHYTgYXWASH8/1j+moDwAQ1x4UziPE7yaAIAdep0jg3urc 9AUE3Sr8qqBRBRX1YL0R++vePDXcTxFQC2O28bEP+ZVG+CNcsJ+PbPgMRvc66W95p2If Lzhw== 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=fN4Rni4jGwkw15y0j6ev8lSPVxwgaeF2vMkVARXcjSE=; b=br4qOTeaC7NnXiGzTqQv58PmxIytgc1e8Hh2S0XBS/xPvmYYzahhtgiO+SVL/SpFqi Bn4RRf+aewQNN40Foofqg1DPZ0i4Mz8lB1mth7zUgoZsyk/IKS0pKpDtV9hbXGfbE5Iz 2eE5AiHiJTLVOtvLy53R2S4j2cLOqTFtM6LahoN4EKx3J61HD47CPkmn+oZvBcCA1ySz vOlYagb3PeJoNNs9JBei5zdJJ9CIQYlmv7VBGtZ9npayMmuwgQTQcviuQpZxC1ghmvn/ PygmSyms+G7YuIFRu7/cG5OwBNslFD+AjDkSBPMbWVHF9uZJuL1QGAJ41uEGSyrGcAgA HrDA== 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 i15-20020aa7c9cf000000b0045a3b951e8bsi12184927edt.194.2022.10.11.21.28.48; Tue, 11 Oct 2022 21:29:14 -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 S229617AbiJLD6z (ORCPT + 99 others); Tue, 11 Oct 2022 23:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229594AbiJLD6x (ORCPT ); Tue, 11 Oct 2022 23:58:53 -0400 Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 602C24B4AD; Tue, 11 Oct 2022 20:58:52 -0700 (PDT) Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-131ea99262dso18224317fac.9; Tue, 11 Oct 2022 20:58:52 -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=fN4Rni4jGwkw15y0j6ev8lSPVxwgaeF2vMkVARXcjSE=; b=OleGlH58RDdGmOBT1x8mKmDK6fmCFscx7ucYYVRL459i0GpIP6H9uAB5svKQ+HY467 VKoY2RkygrrR6X8d9ik10BiotWk3PU6SPzcOeqAVgW6sTBaLY08oVDwnrqLCI4kfsXAr wXme/lC0a85mDzcBC7XuFSf/coe7KkjkQLjsupKBqbfbhQPdb+QMkgfowYLfy2dqKLAh OTUpG5/kdfMtLFvCKXcvqhn/kIhv9bWe+71nxoDKbBEDerFUPK4jEksyKnuyxg+TOhtF 4O7l5zqyL0Mr5i3vn5QRSeGxlm9zXxuDa7ulPgCUg2qLkrAejN7yEceBUKyO4uemgmO1 x7Mg== X-Gm-Message-State: ACrzQf12UPOaowtabX3hdatZe2uaHvkyuWYClT2ndUlnQZdssa9mXjFD Y3815d1NUEs6bSOB99PggLSVX23dG2QqUmMuahng3b4d X-Received: by 2002:a05:6870:82ac:b0:133:34b:6f10 with SMTP id q44-20020a05687082ac00b00133034b6f10mr1414365oae.218.1665547131632; Tue, 11 Oct 2022 20:58:51 -0700 (PDT) MIME-Version: 1.0 References: <20221010053600.272854-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Tue, 11 Oct 2022 20:58:40 -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_H3,RCVD_IN_MSPIKE_WL,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 On Tue, Oct 11, 2022 at 4:57 AM Andi Kleen wrote: > > > >> 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. > > I had a script to test many combinations, but had to check the output > manually > > > > 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. > > Can use "dummy" or some software event (e.g. a probe on some syscall) to > get stable numbers. I don't think we need to cover all hardware for the > output options, the different events should be similar, but need some > coverage for the different aggregation. Or we could add some more tool > events just for testing purposes, that would allow covering different > core scopes etc. and would easily allow generating known counts. Even if we can get a stable number, it still needs to know cpu topology for different aggregation modes to verify the count. Also I'm afraid that cpu hotplug can affect the aggregation. Thanks, Namhyung