Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp389876rwr; Wed, 26 Apr 2023 00:19:14 -0700 (PDT) X-Google-Smtp-Source: AKy350ZpwSV+LjGdi4pHBHnSXF8Us4K6lYsp8e0zbePuHToHKFzOxLJtkxOnFs77nPhypH/wQegY X-Received: by 2002:a05:6a21:6d89:b0:f2:fd1e:efc9 with SMTP id wl9-20020a056a216d8900b000f2fd1eefc9mr18213429pzb.5.1682493554175; Wed, 26 Apr 2023 00:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682493554; cv=none; d=google.com; s=arc-20160816; b=SYUrpEytCYJWIxEBlVVtJFtCHErNp6A9ZktgRtpCwfgDNjgXivEdOuvI80TgFvvfXO ZhQ/ZVmLoY3ffXdIQXW/2pA7BpZHf6RDoSNyYaaA2hCWUDs7qCrosFmWjCovAUgTDmgO HNnUY/fd8V5vcvnwuLJnc2Q8cFCbipyeXfvVxpQUT6Qde4CJzUXaeiG46goS6OqeCrN1 ejpg4qotWHfGcnaaFwj0w+E48lyircTR6HrnSq6yPzBcGKY6z912/qN12c3yz3SIHWcU FOYRzyjZI1QRdryIkf5kIkwueVXxzk6seRQQYYCUKsXKrVCDOPgHHK/pNU4jx1T5yulF nlGA== 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=Z5la9qJcqL6gBH6h4UORwyXdD/ZlzmqtItJD5+R0Siw=; b=BvTnlFlC8oqxbBiRuqOkRyis18ImcCBQGjEbLgwt377m+nuS/FPAjUki2Za3qF/oJ7 ZzHs++RLpxDn1h+2MK5VupStg/zCRHvo0Dp7ZftUccILzOZ4739g9wQ9nD85cntok7Q+ VlZfpvH3v5tGOPSLuONwh9pDb36CEakEW3YVBbjeMz38x0+2iz9VEZNKJawV9Bcbkeaj ld2JqLNusJrLP4CJl1gnyG2+G8ly2mad3SwOKYxXJo+58i8BfNHm/Que/PxXj1FBCj+6 6RHxtvAC8pB38UQSmTXfI6L8vsh5+gGmzZqaG+KTbIq8322L6zH3whU/MG+gznEnyet2 njrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="0z/PrK6g"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a634301000000b00528595a1390si5413714pga.588.2023.04.26.00.19.03; Wed, 26 Apr 2023 00:19:14 -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; dkim=pass header.i=@google.com header.s=20221208 header.b="0z/PrK6g"; 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 S239819AbjDZHIH (ORCPT + 99 others); Wed, 26 Apr 2023 03:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbjDZHHk (ORCPT ); Wed, 26 Apr 2023 03:07:40 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E01740ED for ; Wed, 26 Apr 2023 00:06:04 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-b8f6d2ac543so12900517276.2 for ; Wed, 26 Apr 2023 00:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682492743; x=1685084743; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Z5la9qJcqL6gBH6h4UORwyXdD/ZlzmqtItJD5+R0Siw=; b=0z/PrK6g6Xg4czeVIlj/pX3dWF4UNtJWqvXu+++3gH/z292bUXYL+CP5liRdzaOXwK G0FMKhhAKAFSTw9bYZ0YvNnJhYCTYp1Iogw8KjhJLvRS6ut+2nRWuUIKZKySwKNpDE04 6qql3m+G/H0iVxs0/09IG1lOCs/N6J2G2XR2nEzo4PgiW639yuwiNHXbOLIfSEprwr1G AYECmWQuGkvgI0wWw9a2B1j5kj8IE/9ymlXpo/Fx12X33R5K96yesB0lXUK9B0HUyOzw Xr9plpsGCYkbzwKZ9HEzUopdL4/Tt4Yw4D5C1sVuBsfMtpkhzu0epGLIhrqimnyLobPq 7Q9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682492743; x=1685084743; 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=Z5la9qJcqL6gBH6h4UORwyXdD/ZlzmqtItJD5+R0Siw=; b=V4ahITxO6Q0WpD3uK8ZY5AcAhzkmy4lBWNg/28XH1ChFdIfTcknTA+pB4oj/pQaysN IFQubKsGiMqgspH+z+UwaHnWHLGkVgVPZl0ZwShoJInL/ukFXB6EAfcGY+N52sWkNdCG 3EKD4+Eb0QwaD2hjYqqanhxP3Pg2viDGFClEcsQIa2+jCJk6/vOHolO7MC5NTC3bekk4 ijTs56ID5N2VwIeFk6uVxCokdcceWY7e7uLcpokPd9w9K+7SqygSvX6q/BDgwaT+bZ3B 3uJQ7nlgUpq5XzDQEgRu6RXJcD47GjBujB949xz42QcG1yp9BDeMJ02Hb2Q+JOYicCeW A0Aw== X-Gm-Message-State: AAQBX9dfvDlbBE2vD0dOlA8PBTITpW/AKS1+1LAnsWZZ0ZUR+msI9uyo dZ/vyW/yKWjlOWvy4LuOGKzFUJAOPu8o X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:144f:e890:2b29:48d9]) (user=irogers job=sendgmr) by 2002:a25:d7d8:0:b0:b78:8bd8:6e77 with SMTP id o207-20020a25d7d8000000b00b788bd86e77mr11071249ybg.8.1682492743662; Wed, 26 Apr 2023 00:05:43 -0700 (PDT) Date: Wed, 26 Apr 2023 00:00:44 -0700 In-Reply-To: <20230426070050.1315519-1-irogers@google.com> Message-Id: <20230426070050.1315519-35-irogers@google.com> Mime-Version: 1.0 References: <20230426070050.1315519-1-irogers@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Subject: [PATCH v1 34/40] perf parse-events: Don't reorder atom cpu events From: Ian Rogers To: Arnaldo Carvalho de Melo , Kan Liang , Ahmad Yasin , Peter Zijlstra , Ingo Molnar , Stephane Eranian , Andi Kleen , Perry Taylor , Samantha Alt , Caleb Biggers , Weilin Wang , Edward Baker , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Florian Fischer , Rob Herring , Zhengjun Xing , John Garry , Kajol Jain , Sumanth Korikkar , Thomas Richter , Tiezhu Yang , Ravi Bangoria , Leo Yan , Yang Jihong , James Clark , Suzuki Poulouse , Kang Minchul , Athira Rajeev , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" 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,T_SCC_BODY_TEXT_LINE,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 On hybrid systems the topdown events don't share a fixed counter on the atom core, so they don't require the sorting the perf metric supporting PMUs do. Signed-off-by: Ian Rogers --- tools/perf/arch/x86/util/evlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/arch/x86/util/evlist.c b/tools/perf/arch/x86/util/evlist.c index d4193479a364..1b6065841fb0 100644 --- a/tools/perf/arch/x86/util/evlist.c +++ b/tools/perf/arch/x86/util/evlist.c @@ -6,6 +6,7 @@ #include "util/event.h" #include "util/pmu-hybrid.h" #include "topdown.h" +#include "evsel.h" static int ___evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, @@ -67,8 +68,7 @@ int arch_evlist__add_default_attrs(struct evlist *evlist, int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs) { - if (topdown_sys_has_perf_metrics() && - (!lhs->pmu_name || !strncmp(lhs->pmu_name, "cpu", 3))) { + if (topdown_sys_has_perf_metrics() && evsel__sys_has_perf_metrics(lhs)) { /* Ensure the topdown slots comes first. */ if (strcasestr(lhs->name, "slots")) return -1; -- 2.40.1.495.gc816e09b53d-goog