Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16816500rwd; Mon, 26 Jun 2023 15:55:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BBS5XJZEoT1LXPpOoPByqzxxHCwjUMPH2oyc7txwCEx6I1xDMYe+7pNX2+6kJYt/HzmR8 X-Received: by 2002:a05:6830:1e02:b0:6b7:41d7:b9f with SMTP id s2-20020a0568301e0200b006b741d70b9fmr5515861otr.17.1687820109443; Mon, 26 Jun 2023 15:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687820109; cv=none; d=google.com; s=arc-20160816; b=AHBOltB9X9fU9w2yDMWba1iBP0Pr7adifxlYbyv4qKbRCsoxmTF7/byZxMzmywefYB umnCQF8CYU9zmS1CTx+CQij7HdoRPqHhnMo4NQ2yK4kBSvQtkm0Q39vyV14D1Odvu+JR S1akeymtMGh5uGUIlHul16UcdQ4PXyfrQHMwTsU9suYfLzy6ZRMu61c/Ogqku57x8fiZ Za/FClEcB+OO9lrztdx0N53d+i/XgY39x/CFM8Ydlk/B2/RUDnWVrp7nZ3Pq8QyZJ2Mv MNOQEb+heNpwMEqNP4g/ZNJB/B8U+wQPG77v54fl6zhnVFj4TQ0hzlz/+t5V1f7J4xDp hhcQ== 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=ApZgGh1jcQXRmH9QFJvIu91S082Dql9ubDNdnOsPpe4=; fh=B7aPz4xvHAGTonltig1U0lI8iRw9TTyBgw4FmjHsBkI=; b=jwp8fh9aCkHf3eAy1ia13zOG8dhEOaboTbLfC0GB6Oiw3NcB8d6jNpzyGpfGPNB6UP ps5RD1e6VEIQXCqYQgye4DtQTAmZdiEKwksG285k/I+okmxx17u5qb2jt6631DCwqYhm jW+alTMj+Xn1m4tWiXv+gSKIx3MyPpg7aqL1cAfObtKkVDCmOw3ISXi8dznL6ZUha07F gSS5X4zwykT6C9EJHbDmg4AJPq3E6F7DEUVef4VBS34Q53pWrSji9Ddbg8RL/t6WMOLw rdIuLB07b/ChVzpZgzy9UsXzJyiyyzLjtxi+Q3QSrKaS0s7r3IXNVAA0hQggjLGiYwZV a1zw== 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 j191-20020a6380c8000000b005347c0e5986si6055301pgd.120.2023.06.26.15.54.57; Mon, 26 Jun 2023 15:55:09 -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 S229454AbjFZWQ0 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 26 Jun 2023 18:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230353AbjFZWQL (ORCPT ); Mon, 26 Jun 2023 18:16:11 -0400 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92CA32729; Mon, 26 Jun 2023 15:15:15 -0700 (PDT) Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-44357f34e2dso620340137.3; Mon, 26 Jun 2023 15:15:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817714; x=1690409714; 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=sBTU3bSkJsZYHidxKUw6bezPRH0mHvAIcWPR5hMhfp0=; b=TQ4VCxHUyKs++cOBTB3tC+0p6i+rKM2E2piLFm2/DQifSuVcuSF6/PjLjGjFJpjh5Y hMm9DWnVAzQVx2M6QufwCGHTZ4E3D0tz1itRSkn3j/C+/zAkEpiup4nAyfLpNrPc8ksA p3Uw8GFbSmnvNU++Vhdo8nVDQVGq5Yvuh2UhF9KCRjocXPHf6dWNP/eArMXH/EmkrTD9 E4nhd6haCdW+379p+cYnCnubytyusg3XXViONanQxQGznyFsbtU+CmDC1gf22Owd13nO myoD9L8HEl6dIFQGn5QqaIH4FLBF1cLoS6qXOzryFUeCk2OEt2ff7RZPTSduUaB57X3F HOSQ== X-Gm-Message-State: AC+VfDwf3/JvFMfmCsXTVOtx6jEsONZOkn2jaId6+nypd4/0WCaGa+zM qpMPSf/TMt/oivD8ghsnth/DTGT4Zcgkkr22PyQ6FY7/ X-Received: by 2002:a05:6102:ce:b0:443:69fd:3628 with SMTP id u14-20020a05610200ce00b0044369fd3628mr1875394vsp.13.1687817714410; Mon, 26 Jun 2023 15:15:14 -0700 (PDT) MIME-Version: 1.0 References: <20230626053048.257959-1-irogers@google.com> In-Reply-To: <20230626053048.257959-1-irogers@google.com> From: Namhyung Kim Date: Mon, 26 Jun 2023 15:15:03 -0700 Message-ID: Subject: Re: [PATCH v1] perf pmu: Correct auto_merge_stats test To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT 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, T_SCC_BODY_TEXT_LINE 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 Ian, On Sun, Jun 25, 2023 at 10:31 PM Ian Rogers wrote: > > The original logic was: > https://lore.kernel.org/all/20230527072210.2900565-35-irogers@google.com/ > return !is_pmu_hybrid(pmu->name) > > is_pmu_hybrid was removed but with the incorrect condition which was > fixed for core PMUs but not uncore. This change fixes both. > > Fixes: e23421426e13 ("perf pmu: Correct perf_pmu__auto_merge_stats() affecting hybrid") > Signed-off-by: Ian Rogers Tested-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/util/pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c > index 64fa568a5426..8d5ecd4ff1a9 100644 > --- a/tools/perf/util/pmu.c > +++ b/tools/perf/util/pmu.c > @@ -1427,7 +1427,7 @@ bool perf_pmu__supports_legacy_cache(const struct perf_pmu *pmu) > > bool perf_pmu__auto_merge_stats(const struct perf_pmu *pmu) > { > - return pmu->is_core && perf_pmus__num_core_pmus() == 1; > + return !pmu->is_core || perf_pmus__num_core_pmus() == 1; > } > > bool perf_pmu__have_event(const struct perf_pmu *pmu, const char *name) > -- > 2.41.0.162.gfafddb0af9-goog >