Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27963688rwd; Tue, 4 Jul 2023 10:22:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MKlcSRw2AKrWN39ssMzwKt5LsR1ltvX3qofyZ2yJNgoLB2paAGo1toYCw7eIkPfvZsmw3 X-Received: by 2002:a05:6a20:72a5:b0:122:92d0:452a with SMTP id o37-20020a056a2072a500b0012292d0452amr19256350pzk.37.1688491368899; Tue, 04 Jul 2023 10:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688491368; cv=none; d=google.com; s=arc-20160816; b=H/fLe/buMnbsmUs3ivQKd5UZrnCtTTsxyWbYk/F0tx24niHzHSekEGr3P5fZxQDodX 9LFu0RQGRBk+ZY4rViOGfW0u5JaQAzktzGXdXIIOXlmaaLlEAd/V76PaTSEgESDef28m zUt78yIZLqbpOoMZcsARRID0GnRigGX6fBkGxa+yXyn6TJtwF6iqGe9X0R09sAlbi/uf wCch09i1vGlJ3NdruZwPTTR8bYsGn94dhy3NRYuUhAgr2jhRuMkY88PYo6qnYGcPJPrZ BxYYC7dNgfdrG/ZSxTr5cPhjomXO1A8kYdnOg8qNT+oelR2pR2YN5orzuP48+xHRzs8l BtQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=080AzE4DbUbKxM60UvobFu6Mol81pwIHZok/lOrUjkg=; fh=+1pwu69RSLRUw1F3D6kZHyYl0nEAVQMa4owKkY1NhcY=; b=XG+TM/iAgqNXqBKF5IOmssQH93mQUgwSnc7BYB5jX4m0nc1WsxvXxfa0CPtUdRBFIj uTIO6qG0ZqWWggVk0L/EXHGO6dmwdhZjZBoNLW/WTpUET+hmlJnG7QItjMLDAmoh8eGd IHDej3xLwOLCIn8Zpj1qexhSX3j6TnAI0TMd+9tXsR3qdP0KJkypEUheGRUozEl48ZUu NWjzLxS6IggQYW7RL+8zg21NonAi2ZXm2tXJ3LVDrXW8A2R8oviY0hZ3sv06b/XNG0p7 CKGpwHl+ciVw3JfeHCUWUVwmLO9+LgYCzoEoZj7FGMBg/aGfpyrOoX+HiJaPqTx4GIxj T2dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="K/eqJjDx"; 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 i4-20020a633c44000000b0055bc5ac22acsi873921pgn.229.2023.07.04.10.22.36; Tue, 04 Jul 2023 10:22:48 -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="K/eqJjDx"; 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 S231902AbjGDRNR (ORCPT + 99 others); Tue, 4 Jul 2023 13:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231882AbjGDRNM (ORCPT ); Tue, 4 Jul 2023 13:13:12 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A52710CF for ; Tue, 4 Jul 2023 10:13:09 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-401f4408955so664701cf.1 for ; Tue, 04 Jul 2023 10:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688490788; x=1691082788; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=080AzE4DbUbKxM60UvobFu6Mol81pwIHZok/lOrUjkg=; b=K/eqJjDxNIzgOEkoXaYbrYfmWEgt3YuHW7XmBLtAo1l2VHYbAwh7YEcSCYknFUqwes LPxUTBdJRYAaUlR9y0GGybxaRdLsdV1VtJzz6QzCuHotPHch7VTlLcDCGYoJ3yuzJEar 86lPYEe/4OaGV4hlqEV8sOGmkeHjjGGLpchtze1H8x5LFJE1N1FkqmsePmy7/ICVpzry HLn6FBILoT1/F+hWRD5iRySXPAuPWK1O9CQpnkeusdhT/kUJGHadvFiz53l9g/3zpB/p w9fOpj8HSncFnVp+1bWGs1sP+jyBU9YtaPrBIXmcO/dnijRtma+T1inPyZCxpHK6ClnQ nYDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688490788; x=1691082788; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=080AzE4DbUbKxM60UvobFu6Mol81pwIHZok/lOrUjkg=; b=EykC3uiq1h9lU94sRbaPp0BJfr7kZm0A/0c0zG9fX53Edo4mwqJiggbI5QmE0l7q0w JQnz+BOxdcwpdiIS15+ZjPHpQWZtePeRJF4jHhHNsnkfZxMrRbN+eU3JHiqTL8tP9hx3 vgk9tWUnAW+2dbT+bK8Ad2GyxczslRz9eyLtFAzlqj6sm7vyEXXwBJj/9UtFRMsU6i+5 9xJEmHQz8naUZte46gzpNZAeg5OMkKS4V2fhF6nXG/aiJmq/5BJBXFrr9efuEVG66aJg btQV21cc7s/4cqlnUfE4Ka0K25xAp5fiQgt26TEgh+DJ3LLM2omY1JrLWrBjOwT3F8cr 2RAg== X-Gm-Message-State: ABy/qLZF6aDDUqRA+gwTTEQNbzP9N4xMz7LrXYVmlMRXDrIa8akhbbrb hOoy0x2dpKMluylHQ5RmwEPB8e/DXj4iEfdYMiqjNw== X-Received: by 2002:ac8:5bd3:0:b0:3f2:2c89:f1ef with SMTP id b19-20020ac85bd3000000b003f22c89f1efmr139821qtb.5.1688490788373; Tue, 04 Jul 2023 10:13:08 -0700 (PDT) MIME-Version: 1.0 References: <20230704143628.1177124-1-james.clark@arm.com> <20230704143628.1177124-2-james.clark@arm.com> In-Reply-To: <20230704143628.1177124-2-james.clark@arm.com> From: Ian Rogers Date: Tue, 4 Jul 2023 10:12:56 -0700 Message-ID: Subject: Re: [PATCH 2/2] perf test: Fix event parsing test when PERF_PMU_CAP_EXTENDED_HW_TYPE isn't supported. To: James Clark Cc: linux-perf-users@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Tue, Jul 4, 2023 at 7:38=E2=80=AFAM James Clark wr= ote: > > Arm has multiple PMU types for heterogeneous systems, but doesn't > currently support PERF_PMU_CAP_EXTENDED_HW_TYPE. Make the tests > support both scenarios so that they pass on Arm, and will still pass > once PERF_PMU_CAP_EXTENDED_HW_TYPE support is added. > > Fixes: 27c9fcfc1e14 ("perf test: Update parse-events expectations to test= for multiple events") > Signed-off-by: James Clark > --- > tools/perf/tests/parse-events.c | 86 +++++++++++++++++++-------------- > 1 file changed, 50 insertions(+), 36 deletions(-) > > diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-eve= nts.c > index 21f79aa31233..454b667e144b 100644 > --- a/tools/perf/tests/parse-events.c > +++ b/tools/perf/tests/parse-events.c > @@ -20,6 +20,20 @@ > #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \ > PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD) > > +static int num_entries(void) Thanks James! A nit, I'd prefer a function name that is a little less ambiguous, perhaps num_core_events_per_event which is too long, perhaps num_core_entries. Other than that: Acked-by: Ian Rogers Ian > +{ > + /* > + * If the kernel supports extended type, expect events to be > + * opened once for each PMU type. Otherwise fall back to the lega= cy > + * behavior of opening only one event even though there are multi= ple > + * PMUs > + */ > + if (perf_pmus__supports_extended_type()) > + return perf_pmus__num_core_pmus(); > + > + return 1; > +} > + > static bool test_config(const struct evsel *evsel, __u64 expected_config= ) > { > __u32 type =3D evsel->core.attr.type; > @@ -339,7 +353,7 @@ static int test__checkevent_symbolic_name_modifier(st= ruct evlist *evlist) > struct perf_evsel *evsel; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D perf_pmus__num_cor= e_pmus()); > + evlist->core.nr_entries =3D=3D num_entries()); > > perf_evlist__for_each_entry(&evlist->core, evsel) { > TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude= _user); > @@ -842,11 +856,11 @@ static int test__group1(struct evlist *evlist) > struct evsel *evsel, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (perf_pmus__num_co= re_pmus() * 2)); > + evlist->core.nr_entries =3D=3D (num_entries() * 2= )); > TEST_ASSERT_VAL("wrong number of groups", > - evlist__nr_groups(evlist) =3D=3D perf_pmus__num_c= ore_pmus()); > + evlist__nr_groups(evlist) =3D=3D num_entries()); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* instructions:k */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -885,7 +899,7 @@ static int test__group2(struct evlist *evlist) > struct evsel *evsel, *leader =3D NULL; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (2 * perf_pmus__nu= m_core_pmus() + 1)); > + evlist->core.nr_entries =3D=3D (2 * num_entries()= + 1)); > /* > * TODO: Currently the software event won't be grouped with the h= ardware > * event except for 1 PMU. > @@ -1051,11 +1065,11 @@ static int test__group4(struct evlist *evlist __m= aybe_unused) > struct evsel *evsel, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (perf_pmus__num_co= re_pmus() * 2)); > + evlist->core.nr_entries =3D=3D (num_entries() * 2= )); > TEST_ASSERT_VAL("wrong number of groups", > - perf_pmus__num_core_pmus() =3D=3D evlist__nr_grou= ps(evlist)); > + num_entries() =3D=3D evlist__nr_groups(evlist)); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles:u + p */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1096,11 +1110,11 @@ static int test__group5(struct evlist *evlist __m= aybe_unused) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (5 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (5 * num_entries()= )); > TEST_ASSERT_VAL("wrong number of groups", > - evlist__nr_groups(evlist) =3D=3D (2 * perf_pmus__= num_core_pmus())); > + evlist__nr_groups(evlist) =3D=3D (2 * num_entries= ())); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles + G */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1131,7 +1145,7 @@ static int test__group5(struct evlist *evlist __may= be_unused) > TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel= ) =3D=3D 1); > TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read)= ; > } > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles:G */ > evsel =3D leader =3D evsel__next(evsel); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1161,7 +1175,7 @@ static int test__group5(struct evlist *evlist __may= be_unused) > TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, = leader)); > TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel= ) =3D=3D 1); > } > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles */ > evsel =3D evsel__next(evsel); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1182,11 +1196,11 @@ static int test__group_gh1(struct evlist *evlist) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (2 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (2 * num_entries()= )); > TEST_ASSERT_VAL("wrong number of groups", > - evlist__nr_groups(evlist) =3D=3D perf_pmus__num_c= ore_pmus()); > + evlist__nr_groups(evlist) =3D=3D num_entries()); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles + :H group modifier */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1223,11 +1237,11 @@ static int test__group_gh2(struct evlist *evlist) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (2 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (2 * num_entries()= )); > TEST_ASSERT_VAL("wrong number of groups", > - evlist__nr_groups(evlist) =3D=3D perf_pmus__num_c= ore_pmus()); > + evlist__nr_groups(evlist) =3D=3D num_entries()); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles + :G group modifier */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1264,11 +1278,11 @@ static int test__group_gh3(struct evlist *evlist) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (2 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (2 * num_entries()= )); > TEST_ASSERT_VAL("wrong number of groups", > - evlist__nr_groups(evlist) =3D=3D perf_pmus__num_c= ore_pmus()); > + evlist__nr_groups(evlist) =3D=3D num_entries()); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles:G + :u group modifier */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1305,11 +1319,11 @@ static int test__group_gh4(struct evlist *evlist) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (2 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (2 * num_entries()= )); > TEST_ASSERT_VAL("wrong number of groups", > - evlist__nr_groups(evlist) =3D=3D perf_pmus__num_c= ore_pmus()); > + evlist__nr_groups(evlist) =3D=3D num_entries()); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles:G + :uG group modifier */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1346,9 +1360,9 @@ static int test__leader_sample1(struct evlist *evli= st) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (3 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (3 * num_entries()= )); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles - sampling group leader */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1398,9 +1412,9 @@ static int test__leader_sample2(struct evlist *evli= st __maybe_unused) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (2 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (2 * num_entries()= )); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* instructions - sampling group leader */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1437,9 +1451,9 @@ static int test__checkevent_pinned_modifier(struct = evlist *evlist) > struct evsel *evsel =3D NULL; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D perf_pmus__num_cor= e_pmus()); > + evlist->core.nr_entries =3D=3D num_entries()); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > evsel =3D (i =3D=3D 0 ? evlist__first(evlist) : evsel__ne= xt(evsel)); > TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.e= xclude_user); > TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.= exclude_kernel); > @@ -1455,9 +1469,9 @@ static int test__pinned_group(struct evlist *evlist= ) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (3 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D (3 * num_entries()= )); > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles - group leader */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1500,9 +1514,9 @@ static int test__exclusive_group(struct evlist *evl= ist) > struct evsel *evsel =3D NULL, *leader; > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (3 * perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D 3 * num_entries())= ; > > - for (int i =3D 0; i < perf_pmus__num_core_pmus(); i++) { > + for (int i =3D 0; i < num_entries(); i++) { > /* cycles - group leader */ > evsel =3D leader =3D (i =3D=3D 0 ? evlist__first(evlist) = : evsel__next(evsel)); > TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE =3D=3D e= vsel->core.attr.type); > @@ -1574,7 +1588,7 @@ static int test__checkevent_precise_max_modifier(st= ruct evlist *evlist) > struct evsel *evsel =3D evlist__first(evlist); > > TEST_ASSERT_VAL("wrong number of entries", > - evlist->core.nr_entries =3D=3D (1 + perf_pmus__nu= m_core_pmus())); > + evlist->core.nr_entries =3D=3D 1 + num_entries())= ; > TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE =3D=3D evsel->co= re.attr.type); > TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_= TASK_CLOCK)); > return TEST_OK; > -- > 2.34.1 >