Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp185639rdb; Fri, 29 Sep 2023 23:56:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLXvy+oQlmPTnVOjuyNd4X/3qI7HSq1BRZXX6tYz4mLHpOEDy/ejL75oBrornf6zj/a74G X-Received: by 2002:a17:90a:2e05:b0:274:8249:a85f with SMTP id q5-20020a17090a2e0500b002748249a85fmr5659498pjd.21.1696057004421; Fri, 29 Sep 2023 23:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696057004; cv=none; d=google.com; s=arc-20160816; b=HmhFRG8Cjo4bKlBybvWS+Jtljq5oAvOiEm0oaRei8D21OFuQEHGTAqHwWEbd8qDoj6 FEDhUaDi/L1Odo+DwZFMMFYGN1Wuw1eTUH12+VQ/UKFm71NxnYZHfjBgO5IdhHbVcE0e YIgjxBLm+hcW52BPyuz5IVXbhWEdcMyPjx49vDRrTCUT4eBzo5KrRUFxpatV3mYyRY0z hXQpZ6qmuC2lqaGJmYuWpKzsmoS51NH2TLE+SxxAk0Mzivf3Zj4OnJ1mbnma03i4LTeX 0CT1CrwS4N94Ku0uTdJ09fTYwSanSy8rwwx76Z1gDVHv9T6hZqAN8NSUxIkNHdkGhmzi iJtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=vOHrhlnmraMzo4+Q+Qcekui3GwibivG5K2xiUFSjPQI=; fh=1/QGFprUb3XUK4v8nfswIoL4c98++W+yTzTXsohz+3c=; b=liUp9JZONAoE5hFQDna4WLYX/soCKMIu7kTO4Q2WTmxOuKqiuLYidwshTifQ9Hl5rr rEU1mIDas+BwFO7N7oqdrZOwKzJN/j1wSmPJHmrjoagWN9xno84m5nchPTQTzSiEER67 wdUNybwqUh9qjCbj2JVCoLnV9sIQ0GxDS1SglgZl0XBJYaq9dhpKQ4PdfBK2EL8ix+lT Nt2hiLmjs8PXsa/pGIZ5vdE3IDeYutUudW//FELTJwYjHQUM8jCiUDm/hqNZvxLIRUIs LYw3tLG3nC0gxZ1f/6jmWkwFJOSV7J3CZKJI2lEi57cREoj/XA7ldtsLxQPzq4dVEmMg 9cwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id np16-20020a17090b4c5000b002749baa2edesi3390993pjb.24.2023.09.29.23.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 23:56:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 06C00819164F; Fri, 29 Sep 2023 23:56:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234054AbjI3G42 convert rfc822-to-8bit (ORCPT + 99 others); Sat, 30 Sep 2023 02:56:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232125AbjI3G41 (ORCPT ); Sat, 30 Sep 2023 02:56:27 -0400 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C92C81A7; Fri, 29 Sep 2023 23:56:25 -0700 (PDT) Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-79fca042ec0so341583539f.3; Fri, 29 Sep 2023 23:56:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696056985; x=1696661785; h=content-transfer-encoding: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=xLVnq7bpoB/DPNFDYFDqdcabpCoSce/kmj2cilxMHvw=; b=LQcUa7tWs5d5/gAuJ+3pHuRb3t8L6gvzNGOQTC2mwtKOmSKOyjbVesEIYiNbgaVQHJ 5JAYvWNXIzlO/5qb2yYP5CaemxV/ioEJ4V++9v7BrjnipMNDio/h0ogCXD8yKMmNdfl2 7bxl8YGS3fxp0WU/AI2pLp3NqFpepPV+M5gVJA0i2e15cE0iqkEa3zcMEnuJWynPJhjp W9TgRqh4bZr/I/0fWVo3S6vqDDMbMWZqwWGIZ3QodLkRbll9/1NqltEfp/MrnZlX23sj 6/6rPkimTxYUYIMuk4prwAX8dPgHSewQfHElpD+c4DWu4CGbUqcBUlg4TKUkNPiAWyFm eqBQ== X-Gm-Message-State: AOJu0YwVir4PRcDMKl7Af50xTUJlg6Fp5UJwk8EGH755mOslvMPrEto3 P/FQXgb8rXEqYh5X0K2Ff5YC4mqt4AyYAWmIDLM= X-Received: by 2002:a5e:c74d:0:b0:79f:96db:f33d with SMTP id g13-20020a5ec74d000000b0079f96dbf33dmr6498919iop.9.1696056984951; Fri, 29 Sep 2023 23:56:24 -0700 (PDT) MIME-Version: 1.0 References: <20230920122349.418673-1-wyes.karny@amd.com> In-Reply-To: From: Namhyung Kim Date: Fri, 29 Sep 2023 23:56:13 -0700 Message-ID: Subject: Re: [PATCH] perf pmu: Fix perf stat output with correct scale and unit To: Ian Rogers Cc: Wyes Karny , peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, adrian.hunter@intel.com, kan.liang@linux.intel.com, james.clark@arm.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, sandipan.das@amd.com, ravi.bangoria@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 29 Sep 2023 23:56:42 -0700 (PDT) On Tue, Sep 26, 2023 at 9:39 PM Namhyung Kim wrote: > > Hi Ian, > > On Tue, Sep 26, 2023 at 9:07 PM Ian Rogers wrote: > > > > On Tue, Sep 26, 2023 at 3:51 PM Namhyung Kim wrote: > > > > > > On Wed, Sep 20, 2023 at 9:02 AM Ian Rogers wrote: > > > > > > > > On Wed, Sep 20, 2023 at 5:24 AM Wyes Karny wrote: > > > > > > > > > > The perf_pmu__parse_* functions for the sysfs files of pmu event’s > > > > > scale, unit, per-pkg and snapshot were updated in commit 7b723dbb96e8 > > > > > ("perf pmu: Be lazy about loading event info files from sysfs"). > > > > > However, the paths for these sysfs files were incorrect. This resulted > > > > > in perf stat reporting values with wrong scaling and missing units. This > > > > > is fixed by correcting the paths for these sysfs files. > > > > > > > > > > Before this fix: > > > > > > > > > > $sudo perf stat -e power/energy-pkg/ -- sleep 2 > > > > > > > > > > Performance counter stats for 'system wide': > > > > > > > > > > 351,217,188,864 power/energy-pkg/ > > > > > > > > > > 2.004127961 seconds time elapsed > > > > > > > > > > After this fix: > > > > > > > > > > $sudo perf stat -e power/energy-pkg/ -- sleep 2 > > > > > > > > > > Performance counter stats for 'system wide': > > > > > > > > > > 80.58 Joules power/energy-pkg/ > > > > > > > > > > 2.004009749 seconds time elapsed > > > > > > > > > > Fixes: 7b723dbb96e8 ("perf pmu: Be lazy about loading event info files from sysfs") > > > > > Signed-off-by: Wyes Karny > > > > > > > > Reviewed-by: Ian Rogers > > > > > > Applied to perf-tools-next, thanks! > > > > Thanks Namhyung, I think this should be a candidate for perf-tools so > > that 6.6 doesn't regress for sysfs events. > > I see, I overlooked that it's for the current cycle. > I'll move it to perf-tools. Applied to perf-tools, thanks!