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 495B8C04A6A for ; Tue, 15 Aug 2023 01:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233794AbjHOBMS (ORCPT ); Mon, 14 Aug 2023 21:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233805AbjHOBLz (ORCPT ); Mon, 14 Aug 2023 21:11:55 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F5E310C1 for ; Mon, 14 Aug 2023 18:11:54 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-40a47e8e38dso82231cf.1 for ; Mon, 14 Aug 2023 18:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692061913; x=1692666713; 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=JWqNV8j4rJ01I2/kmzyAmB0UmrRYsbr0X6nXpcU09Kw=; b=QoLabUP1MxN2EF7Rd4tNg3zlcuKjFWbe+WC0AcPXwj7g9lnzIQ6CDnLae+5Ox8WgHs m/VbFI8L4dM1KeGHLu9fJrUhoR9io291MGq5WgqmfDFCYiTApGnU6x6GQo7baD6npljz kutAhyWEFApMAXeB6fRWBFxUfZE5+2H3Z6/7B2E+xbxO9d5Vsa+pcWF8b3tU5KAesWT8 J0x30KMknDkoes66oe+mYhdViXl+CecTQCEJPxBrHNufY/ZkAcYR6C/DyilRhvr9FIE5 d9rfg8yMjJLbCGyDv2X49LhzaUQYC54VJaOeZVQoZZqnYq6s8UAmZmfRD2YR0Aj8LiJ6 XrAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692061913; x=1692666713; 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=JWqNV8j4rJ01I2/kmzyAmB0UmrRYsbr0X6nXpcU09Kw=; b=LRjRVvyc7WVgI4CFvbHRTcc5unpQLTq7vHcPhgeUcpiV1L+w0fWxxenFhak5w3QEpj plT5eID5gq9sBLOFDZpf08K8oooOzwfXIJUeN3GcGUS4od2lZVZrFyamfKyaODwkKQT/ Jibj34g6NQE1+yT4hjTJS4j9CEeGCaNvUJGwgeGPbk/sY728dZ3s3UyydWLgObSEvmtN KIcscOVXLi3QeDF+MAtFWUa0fURO+awg7clyJQpBUpkW3wuTm41l+ZxqjWwyo38GeDDS r1QZ5tJ50nzPn+b0pUkHYZ/JYzyV7/wGek2sydL3PVyjKo3DqxWUCWs8HsMUKrBki5IF ZTRA== X-Gm-Message-State: AOJu0YzccCRY7G8zql22P8AGYmRCkgaHKGbPKntFXcfjxOmAYIWzarSn 5PoM+6Gy0q2hDF18PMxcl5YBCDRDseiiuAUyaZhJ9A== X-Google-Smtp-Source: AGHT+IG7MHwhRcBTr5x6srMH1dL3HfSXwFUD3fZEud/UGvJocL5lEnagtJBP+/IcyELLp0Vyr1N2I8JYPNiEqhFk2HA= X-Received: by 2002:a05:622a:11cb:b0:410:385c:d1d9 with SMTP id n11-20020a05622a11cb00b00410385cd1d9mr606418qtk.25.1692061913091; Mon, 14 Aug 2023 18:11:53 -0700 (PDT) MIME-Version: 1.0 References: <1691394685-61240-1-git-send-email-renyu.zj@linux.alibaba.com> <1691394685-61240-6-git-send-email-renyu.zj@linux.alibaba.com> In-Reply-To: <1691394685-61240-6-git-send-email-renyu.zj@linux.alibaba.com> From: Ian Rogers Date: Mon, 14 Aug 2023 18:11:40 -0700 Message-ID: Subject: Re: [PATCH v6 5/7] perf test: Add pmu-event test for "Compat" and new event_field. To: Jing Zhang Cc: John Garry , Will Deacon , James Clark , Arnaldo Carvalho de Melo , Mark Rutland , Mike Leach , Leo Yan , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org, Zhuo Song , Shuai Xue Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon, Aug 7, 2023 at 12:51=E2=80=AFAM Jing Zhang wrote: > > Add new event test for uncore system event which is used to verify the > functionality of "Compat" matching multiple identifiers and the new event > fields "EventIdCode" and "Type". > > Signed-off-by: Jing Zhang Did you test with NO_JEVENTS=3D1? > --- > .../pmu-events/arch/test/test_soc/sys/uncore.json | 8 ++++ > tools/perf/tests/pmu-events.c | 55 ++++++++++++++++= ++++++ > 2 files changed, 63 insertions(+) > > diff --git a/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json b/t= ools/perf/pmu-events/arch/test/test_soc/sys/uncore.json > index c7e7528..19ec595 100644 > --- a/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json > +++ b/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json > @@ -12,5 +12,13 @@ > "EventName": "sys_ccn_pmu.read_cycles", > "Unit": "sys_ccn_pmu", > "Compat": "0x01" > + }, > + { > + "BriefDescription": "Counts total cache misses in first looku= p result (high priority).", > + "Type": "0x05", > + "EventIdCode": "0x01", > + "EventName": "sys_cmn_pmu.hnf_cache_miss", > + "Unit": "sys_cmn_pmu", > + "Compat": "434*;436*;43c*;43a01" I suspect this needs adding here: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tr= ee/tools/perf/pmu-events/empty-pmu-events.c?h=3Dperf-tools-next#n247 Thanks, Ian > } > ] > diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.= c > index 3204252..79fb3e2 100644 > --- a/tools/perf/tests/pmu-events.c > +++ b/tools/perf/tests/pmu-events.c > @@ -255,9 +255,24 @@ struct perf_pmu_test_pmu { > .matching_pmu =3D "uncore_sys_ccn_pmu4", > }; > > +static const struct perf_pmu_test_event sys_cmn_pmu_hnf_cache_miss =3D { > + .event =3D { > + .name =3D "sys_cmn_pmu.hnf_cache_miss", > + .event =3D "type=3D0x05,eventid=3D0x01", > + .desc =3D "Counts total cache misses in first lookup resu= lt (high priority). Unit: uncore_sys_cmn_pmu ", > + .topic =3D "uncore", > + .pmu =3D "uncore_sys_cmn_pmu", > + .compat =3D "434*;436*;43c*;43a01", > + }, > + .alias_str =3D "type=3D0x5,eventid=3D0x1", > + .alias_long_desc =3D "Counts total cache misses in first lookup r= esult (high priority). Unit: uncore_sys_cmn_pmu ", > + .matching_pmu =3D "uncore_sys_cmn_pmu0", > +}; > + > static const struct perf_pmu_test_event *sys_events[] =3D { > &sys_ddr_pmu_write_cycles, > &sys_ccn_pmu_read_cycles, > + &sys_cmn_pmu_hnf_cache_miss, > NULL > }; > > @@ -704,6 +719,46 @@ static int __test_uncore_pmu_event_aliases(struct pe= rf_pmu_test_pmu *test_pmu) > &sys_ccn_pmu_read_cycles, > }, > }, > + { > + .pmu =3D { > + .name =3D (char *)"uncore_sys_cmn_pmu0", > + .is_uncore =3D 1, > + .id =3D (char *)"43401", > + }, > + .aliases =3D { > + &sys_cmn_pmu_hnf_cache_miss, > + }, > + }, > + { > + .pmu =3D { > + .name =3D (char *)"uncore_sys_cmn_pmu0", > + .is_uncore =3D 1, > + .id =3D (char *)"43602", > + }, > + .aliases =3D { > + &sys_cmn_pmu_hnf_cache_miss, > + }, > + }, > + { > + .pmu =3D { > + .name =3D (char *)"uncore_sys_cmn_pmu0", > + .is_uncore =3D 1, > + .id =3D (char *)"43c03", > + }, > + .aliases =3D { > + &sys_cmn_pmu_hnf_cache_miss, > + }, > + }, > + { > + .pmu =3D { > + .name =3D (char *)"uncore_sys_cmn_pmu0", > + .is_uncore =3D 1, > + .id =3D (char *)"43a01", > + }, > + .aliases =3D { > + &sys_cmn_pmu_hnf_cache_miss, > + }, > + } > }; > > /* Test that aliases generated are as expected */ > -- > 1.8.3.1 >