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 C93DCC77B7E for ; Sat, 29 Apr 2023 05:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347450AbjD2Fmf (ORCPT ); Sat, 29 Apr 2023 01:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347462AbjD2FmI (ORCPT ); Sat, 29 Apr 2023 01:42:08 -0400 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 55B9C4C18 for ; Fri, 28 Apr 2023 22:41:39 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-b9a6eeea78cso16081248276.0 for ; Fri, 28 Apr 2023 22:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682746845; x=1685338845; 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=eHOhS+G5jYvCl5A+qGW3eI/Xv+82F/OH4nLYlPnw7usG0kftQAz8zDgw64A5svCLQV /tH4adN56n7hdlgBPugJvOwEeBxu75aiPZi7ipKvksGECRxJrXYObK8A+Dy+/oEdQAvc svrEVmBlqXeiaw7Bagc+dXLXQoMczuUpGL6NcpS57xoy/FzejPYdNnbDlG0V9mMtsayI XggRxpxMc7aN7tkCAzZXdmWxYaEc2nqThZnGQBVF0GWhX+0U0Dk8+uAqyInL3PKDw4V4 lbQjAJ0x0aCMb9mYmwO149qelVkoIgJ5lMEg39cvg1vtP7wXfUM36ZZC+jEIXQzA+yrY rR0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682746845; x=1685338845; 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=bQcbeeMCG/gJZUOTTFEjdEc8yEFNS2x3Ko65JaCW68E59xkVqqxO7QtiuD95ALBViS Wc4RdcDQlvF4UUlXBfLpbQK5ZTBD7yRmupkfFiuEpdA+A2z8RU+YmROx7pIsC6Oj72kS YX32ZXI2gNeH7ur35dOSH01eFbSgOxN4AjAK6vyQH8rHIHxXR1d/BCs7/1gLpuUTzp+e nK+GFx8RULSjjaTjqK+q90/M9udcHRqtfIFpmLDqLgsKZ1xgnz7gtAR287U56NQfDvam K1JCcRwxH+A/epZTrJZonrQ3DCJ9v7QA5AoP/8LZz+Q1pkkZRbSfiO5mwnR9KtvnGASv Kmwg== X-Gm-Message-State: AC+VfDzzHpanu2Ww/em4mQOlR1hek/7ecTPgDMvwgCete8eDZNb+wMkq 7zCk9PvdUsP1hPcIu9oAnVKTNc/opUdw X-Google-Smtp-Source: ACHHUZ4svx+yaIKeN53Ts2UGm0DOR/DGNixsSn3Rc/WooLVjfXtQ3muLB0EfKOf5A1jDBpQrxAPt/M/NCr3Y X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:c563:7e28:fb7c:bce3]) (user=irogers job=sendgmr) by 2002:a81:c709:0:b0:559:e0fa:7c82 with SMTP id m9-20020a81c709000000b00559e0fa7c82mr623763ywi.0.1682746845448; Fri, 28 Apr 2023 22:40:45 -0700 (PDT) Date: Fri, 28 Apr 2023 22:34:59 -0700 In-Reply-To: <20230429053506.1962559-1-irogers@google.com> Message-Id: <20230429053506.1962559-40-irogers@google.com> Mime-Version: 1.0 References: <20230429053506.1962559-1-irogers@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Subject: [PATCH v3 39/46] 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" Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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