From patchwork Thu Mar 2 04:12:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 63196 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4033560wrd; Wed, 1 Mar 2023 20:16:08 -0800 (PST) X-Google-Smtp-Source: AK7set/GU0R7AtW0HTNeRt4qYFmTfe5n0PDvHtogAbaHedUEOtO8iXUWBrR+kDw6mqshN/mBw7dg X-Received: by 2002:a17:902:cf4d:b0:19c:c2c4:a0f2 with SMTP id e13-20020a170902cf4d00b0019cc2c4a0f2mr6995041plg.26.1677730567988; Wed, 01 Mar 2023 20:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677730567; cv=none; d=google.com; s=arc-20160816; b=LH7NiXrTttx9gflKW3Ua9KLiHfShaaxu3GE8jnuiSLtlqc3hhNExcfyGqYVNaYTs6w 7VXtfixgz/5SnUhAYDbcadb4mpgOQd5Vkf8i+hwy/72vYlk2GNSXe/mcrwaveQz7Pigg DFYz01f1P6/AbfDOY468eZrJCx6ckKd6yK6Hf4ilskXw3X9p6uNz0XzpK/mjEhoqQ77q EH4L0MHYXMOdJatKugmchZ378gVHXIAnno7/311iR5wkHCUCLdcINazQB1+LNTz7t/ZS xNlHhyJESdlKXJQvM8p2BAGok+oZcFZRz9u7KnnpzfN4ZYb/dU9Odbmeh4Tcp6CsLQtP Wgag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=jg6IMjGjrVTTIu+EnMv4tDRbAkAbegs9QpsJAAuMpXw=; b=GaE0k25oAVoktS/8sjS9KbDPv4S9nAFF/EUWRaFBosDcUKzdLAEOWx12biUVJH0lem PHx2SnYq22F+/xhpU2CUHVEeHt1yHFwZ9P8u1NZWVft9udeJtny3XUgP/F0XBJVTRKz0 175Qmgi7Dy/PfWIVbjUELb2F7MpSb3yVh/4LXL6WanC258VzFVpDNOYKCH0m6YEJ0PYH pEt7dy98KYpENQLdCXhH/N6MwULo17/Oi+KPQo4Rq2CtPehABviQGIVdO/6KX7i9B9Ij zkhWhpG7MZ00itKNt35FZhDeavHjEaizIDGazOT9tacZGo84Z9M8/k5LqggN2gW500A4 HkbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QdXTTG18; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk12-20020a170903070c00b0019a826d304dsi13407915plb.633.2023.03.01.20.15.55; Wed, 01 Mar 2023 20:16:07 -0800 (PST) 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; dkim=pass header.i=@google.com header.s=20210112 header.b=QdXTTG18; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbjCBENv (ORCPT + 99 others); Wed, 1 Mar 2023 23:13:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229834AbjCBENY (ORCPT ); Wed, 1 Mar 2023 23:13:24 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 337333E61A for ; Wed, 1 Mar 2023 20:13:16 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id 204-20020a2514d5000000b00a3637aea9e1so2810706ybu.17 for ; Wed, 01 Mar 2023 20:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1677730395; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=jg6IMjGjrVTTIu+EnMv4tDRbAkAbegs9QpsJAAuMpXw=; b=QdXTTG18tvoaUzogomQ8IIMRWYDh50wm0SYSRSBjt8mOk3Mpeny67Ubc1ihJTdykF8 DtsvcjA0gRqZZnG16lTL7kpIw2xBrixZQg237a4JC+rVUDSl1eclwqN7PIGj5SZ8aukh t7JcobuwABd+/XgGeYwksYa6zcuizId/cCnYnNQPmHVfoTwZ0VKPTvotFmiSTvPAEuGP 8n8okejR1xp5fh4wrNO4fO//Y/xur6xE4Fdpnt9WuAfgs6/qI449eCWr6bYjdizl0xfb d3bfq4fZCS5zkNYCp5TtB/sk+gJ2z5KLFtvcpqkZ87TerCmAdJFwyBedv1rl/BvC73ck NwoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677730395; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jg6IMjGjrVTTIu+EnMv4tDRbAkAbegs9QpsJAAuMpXw=; b=ZTLBwQEgIMX8H9R1WzlPJ6hvsbBuei4mRb8mliBa2jfHy7Hh+lBLI+Gdus3MuEwkvc z2YFAlTAZ0X1HOAVNSzPXqHNroM6HC/on6bv2RPD+T255bGaQHRolLvUvuSsyb9t/3/G 0HT28eunHXZNoXhZfoO4D5IcaTnq9fLn6cSkbLeabyHs08noDViB0ciNUEkilL7RjMXX aiw9RuIA8Rg4Oi8xa4IqVOa+1ifOi0KpDWbDWfW7qzR0XZHfE8Q6LCr2glKUKiTjgSdn +yRF8h3EBmvAZTxOcEK4nH53syLdF8EMzG4SEAw1nNIrBOgkrynJjZms/E/fXNvPfHE3 vW5g== X-Gm-Message-State: AO0yUKX5sZad4iUJF2TceivYVAhOe0kzGNn2RwOaYngWUl3S0gckn+H4 z+yb5630+kyuYSF7ie9wxmoJIcX6pAZO X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:bdf9:f5cb:d05:c4d5]) (user=irogers job=sendgmr) by 2002:a25:fb0e:0:b0:ad0:a82:7ef2 with SMTP id j14-20020a25fb0e000000b00ad00a827ef2mr900496ybe.8.1677730394822; Wed, 01 Mar 2023 20:13:14 -0800 (PST) Date: Wed, 1 Mar 2023 20:12:06 -0800 In-Reply-To: <20230302041211.852330-1-irogers@google.com> Message-Id: <20230302041211.852330-6-irogers@google.com> Mime-Version: 1.0 References: <20230302041211.852330-1-irogers@google.com> X-Mailer: git-send-email 2.39.2.722.g9855ee24e9-goog Subject: [PATCH v1 05/10] perf evsel: Limit in group test to CPUs From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Kan Liang , Zhengjun Xing , Ravi Bangoria , Adrian Hunter , "Steinar H. Gunderson" , Qi Liu , Kim Phillips , Florian Fischer , James Clark , Suzuki Poulouse , Sean Christopherson , Leo Yan , John Garry , Kajol Jain , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephane Eranian , Ian Rogers X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759228008150596135?= X-GMAIL-MSGID: =?utf-8?q?1759228008150596135?= Don't just match on the event name, restict based on the PMU too. Signed-off-by: Ian Rogers --- tools/perf/arch/x86/util/evsel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/arch/x86/util/evsel.c b/tools/perf/arch/x86/util/evsel.c index ea3972d785d1..580b0a172136 100644 --- a/tools/perf/arch/x86/util/evsel.c +++ b/tools/perf/arch/x86/util/evsel.c @@ -61,6 +61,9 @@ bool arch_evsel__must_be_in_group(const struct evsel *evsel) if (!evsel__sys_has_perf_metrics(evsel)) return false; + if (evsel->pmu_name && strncmp(evsel->pmu_name, "cpu", 3)) + return false; + return evsel->name && (strcasestr(evsel->name, "slots") || strcasestr(evsel->name, "topdown"));