From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 464D8CCA48A for ; Tue, 7 Jun 2022 21:54:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383501AbiFGVxP (ORCPT ); Tue, 7 Jun 2022 17:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377225AbiFGU7f (ORCPT ); Tue, 7 Jun 2022 16:59:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C22A2187076; Tue, 7 Jun 2022 11:44:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id 1F0D8B8239B; Tue, 7 Jun 2022 18:44:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E1A9C385A2; Tue, 7 Jun 2022 18:44:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627485; bh=kckRoG9lqxpsZdaB+tTCcD/6R4thHI69wGhEV+seiP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FlY7upfuFQ+GXV3GPY0YRzrt+9/+dYv0m7Xs66+acGITK5aA06PwiVR9tfdOwGEfl Qo3BFkR7oacz5+DdJINOTqJqVIwf4lEKdy4OU5/OcQWnbXlguWEXQx+F0n9Dbk4ZyT WFM/Q5RVgNteYSHR87h/v2gHkI6DrR3ZTBV9p6WY= 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.17 757/772] perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems Date: Tue, 7 Jun 2022 19:05:49 +0200 Message-Id: <20220607165011.331502794@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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")); }