Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2199516iof; Tue, 7 Jun 2022 23:00:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv791GnsKnxStPLebwMVYMGDPUXK+v/B+BazWOjnfkFnwJnC/JUC9vl5FEtsFloYtuIeIn X-Received: by 2002:a17:902:e5cb:b0:166:3622:a7e4 with SMTP id u11-20020a170902e5cb00b001663622a7e4mr32421233plf.32.1654668038977; Tue, 07 Jun 2022 23:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654668038; cv=none; d=google.com; s=arc-20160816; b=roBZmZP3rBNzs1Jj1B79Kk/giB8N+CQKS2Qodt617/xjiCmyw1HJNVLw+SAEkLG2mM UDtj0AOlgUch4WLAltD5EN6Uji0cqm+SpNBRc8r4vqtNdbuUTDG56yaeWIWL7VSz55cL FwO2QjCx5w78YHzkiXZJe8+3Gvc4/xi450Cdp0DOxAFAkDjFUwFtMmIXLjDjghpzY/M8 LVcHM+xBegiN5om8UdyiRTFJhf36euu7RwGT4MwST7YLdRjGuAuCzEF8GTh8+Wukm00M 8BbXmolkNGGpkherMj/qBCs5d0g38WpZxonF9EhYNFBmnQhrj7Aa324CSHj74UEwgTCw zegQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Yxh+hDex6tITE3HOJVe9HVjTqufL387dSaitsBTVqSc=; b=U1vopNMhp4dEoF5IuLeYrH/EtL37KCnMkZArCr33IrPe7sZ7lJ9D69ShwelvqRcBlz usRuOYAvAB4qtysbMZWWezFutiUtasSQq7JRqZCVAFKcvM9qatAimJwjP3V/TVJayRsd kXiclfFfOPxmUoeuQE7WVx1nFuawvjCo1tTwbPyGAwwvkP6WvVko3+wtLZEov9E9JsHL M7ZVg6UDYZd8tcpGfINRrIrl8sGsaBOq+D5zctX7eOuM5Yvf/7DRlytdn1uSHxMb8XYp eqKEq03NoXU0US3DW6WaFcMVeoyOto20DhUZAqy0kclVMQ7NYioNcUFzRUxfiNTnNRga YHwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=shFPALc9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t197-20020a635fce000000b003fe313da35asi1482117pgb.592.2022.06.07.23.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:00:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=shFPALc9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D8124516F7; Tue, 7 Jun 2022 22:25:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238514AbiFHAnt (ORCPT + 99 others); Tue, 7 Jun 2022 20:43:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380754AbiFGWcS (ORCPT ); Tue, 7 Jun 2022 18:32:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E843B27C242; Tue, 7 Jun 2022 12:25:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 841A460C7F; Tue, 7 Jun 2022 19:25:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61D09C385A2; Tue, 7 Jun 2022 19:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629918; bh=kckRoG9lqxpsZdaB+tTCcD/6R4thHI69wGhEV+seiP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=shFPALc9ki2O7J5NGgmy9SH5awGrK5cO7Gu9rSpDiaGaOJrIrLQLfKva7xJ0B8HD6 zrjV8HB4i8sqp2BBFvmBCxQKfS5EWuFIkYNTTpky7r2XKLmF2xGnVyb4pkietkxzfL TCclz8Ju9Ea/BB32ElpLPk1f6z3SNzjD2QTylMO4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhengjun Xing , Kan Liang , Ian Rogers , Arnaldo Carvalho de Melo , peterz@infradead.org, adrian.hunter@intel.com, alexander.shishkin@intel.com, acme@kernel.org, ak@linux.intel.com, jolsa@redhat.com, mingo@redhat.com, linux-perf-users@vger.kernel.org Subject: [PATCH 5.18 865/879] perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems Date: Tue, 7 Jun 2022 19:06:23 +0200 Message-Id: <20220607165027.960918556@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Zhengjun Xing commit e69a5c010246ca6a87c4e6f13d0a291954bdece8 upstream. For the hybrid system, the "slots" event changes to "cpu_core/slots/", need extend API arch_evsel__must_be_in_group() to support hybrid systems. In the origin code, for hybrid system event "cpu_core/slots/", the output of the API arch_evsel__must_be_in_group() is "false" (in fact,it should be "true"). Currently only one API evsel__remove_from_group() calls it. In evsel__remove_from_group(), it adds the second condition to check, so the output of evsel__remove_from_group() still is correct. That's the reason why there isn't an instant error. I'd like to fix the issue found in API arch_evsel__must_be_in_group() in case someone else using the function in the other place. Fixes: d98079c05b5a ("perf evlist: Keep topdown counters in weak group") Signed-off-by: Zhengjun Xing Reviewed-by: Kan Liang Acked-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20220601152544.1842447-1-zhengjun.xing@linux.intel.com Cc: peterz@infradead.org Cc: adrian.hunter@intel.com Cc: alexander.shishkin@intel.com Cc: acme@kernel.org Cc: ak@linux.intel.com Cc: jolsa@redhat.com Cc: mingo@redhat.com Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- tools/perf/arch/x86/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/arch/x86/util/evsel.c +++ b/tools/perf/arch/x86/util/evsel.c @@ -38,6 +38,6 @@ bool arch_evsel__must_be_in_group(const return false; return evsel->name && - (!strcasecmp(evsel->name, "slots") || + (strcasestr(evsel->name, "slots") || strcasestr(evsel->name, "topdown")); }