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 0D0DEEE49A0 for ; Fri, 25 Aug 2023 04:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239419AbjHYE15 (ORCPT ); Fri, 25 Aug 2023 00:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237162AbjHYE1e (ORCPT ); Fri, 25 Aug 2023 00:27:34 -0400 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B0351FEB for ; Thu, 24 Aug 2023 21:27:32 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-34bae839382so79775ab.1 for ; Thu, 24 Aug 2023 21:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692937651; x=1693542451; darn=vger.kernel.org; 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=6ECeZvJgWFqtvuD7lpXIBJzl5ySRLWKUmXwSQbbS8+U=; b=CTKbdpKutG2ZtFvieJDjMh/qF+j9+oMKWYoFKNHfNCWNUYf9xKuvYv5vUWNuvmK7n+ 488Twg616fT0l1WsmEGMUbHKeIQNXofmFP9k0W/n2wnEnn2onJ5AkjTT3wjBK5076JdN LA1BK+A6fsuOMT/nda3HYH1V148TE4Mg4w47v0ZSj7SDkNwPyoJBxn21psMwMoA14Ic2 JEf16THyEGt33cVjmMdnBPb9z0q1pwOBP9wbhnps83eiaNYRMVzooWoSzHPNbHK2iX5F 16r5cx7q/GnVIpCBCAjYuCcvWWaNBcNzQgxArp2oN7TvB25qCkUIHCq2Gz4o57ikfCXe Vd+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692937651; x=1693542451; 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=6ECeZvJgWFqtvuD7lpXIBJzl5ySRLWKUmXwSQbbS8+U=; b=LdA8NJhAAJ6tZ2ABnmWUBL2QiPsd8ZzC//bV2PwsPyC1zee5UAvJ5R80vE/37oPpQ/ nD7bYhE45ZnLQ/XKInhxwy/iOyIDvLvgeWme5xPbVD7utY0qu3NSCUX2mK8peb85IAh1 r9LcDTzjU348VaFU4l8d0tY6kqkEm4bHmGeOX8C6OPRZ4A6MHvj+uokex+nPmEucBCJS ThTLCSGfK26IQodrKOUoVoSph+UPANYzZ28pF+aRUSJuuMHWDJ84ldZT1zeb/yr/ZSa0 Me42w0TtpaOhuVpu+LUrBoHVFrDvGdO9J6xVdeR88Uw7nVbebK1WK8gxJlNJxm/uNllZ 037Q== X-Gm-Message-State: AOJu0YzX2SgoHlE/wVb2w1km5SaTsKN2iLblYPLskNI6PqVhrqbPBONc nFzlEZeDu3eF2Ii3vPjUUvrcaQdv+uVYVtQRbgDQkQ== X-Google-Smtp-Source: AGHT+IFv/SzSk0p4koyu2JQ/XSi3hHVcudbdNIEaHl1uPsRmsmpaKPExCbP18OxKVldfw6PlA9l4VHrQF+Il/84PT/A= X-Received: by 2002:a05:6e02:1a0b:b0:348:f9a8:19d4 with SMTP id s11-20020a056e021a0b00b00348f9a819d4mr88953ild.29.1692937651400; Thu, 24 Aug 2023 21:27:31 -0700 (PDT) MIME-Version: 1.0 References: <1692606977-92009-1-git-send-email-renyu.zj@linux.alibaba.com> <1692606977-92009-6-git-send-email-renyu.zj@linux.alibaba.com> In-Reply-To: <1692606977-92009-6-git-send-email-renyu.zj@linux.alibaba.com> From: Ian Rogers Date: Thu, 24 Aug 2023 21:27:19 -0700 Message-ID: Subject: Re: [PATCH v7 5/8] perf test: Make matching_pmu effective 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-perf-users@vger.kernel.org On Mon, Aug 21, 2023 at 1:36=E2=80=AFAM Jing Zhang wrote: > > The perf_pmu_test_event.matching_pmu didn't work. No matter what its > value is, it does not affect the test results. So let matching_pmu be > used for matching perf_pmu_test_pmu.pmu.name. Could you rebase this onto the latest perf-tools-next, I'd like to test thi= s. Thanks, Ian > Signed-off-by: Jing Zhang > Reviewed-by: John Garry > --- > tools/perf/tests/pmu-events.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.= c > index 1dff863b..3204252 100644 > --- a/tools/perf/tests/pmu-events.c > +++ b/tools/perf/tests/pmu-events.c > @@ -238,7 +238,7 @@ struct perf_pmu_test_pmu { > }, > .alias_str =3D "event=3D0x2b", > .alias_long_desc =3D "ddr write-cycles event. Unit: uncore_sys_dd= r_pmu ", > - .matching_pmu =3D "uncore_sys_ddr_pmu", > + .matching_pmu =3D "uncore_sys_ddr_pmu0", > }; > > static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles =3D { > @@ -252,7 +252,7 @@ struct perf_pmu_test_pmu { > }, > .alias_str =3D "config=3D0x2c", > .alias_long_desc =3D "ccn read-cycles event. Unit: uncore_sys_ccn= _pmu ", > - .matching_pmu =3D "uncore_sys_ccn_pmu", > + .matching_pmu =3D "uncore_sys_ccn_pmu4", > }; > > static const struct perf_pmu_test_event *sys_events[] =3D { > @@ -599,6 +599,11 @@ static int __test_uncore_pmu_event_aliases(struct pe= rf_pmu_test_pmu *test_pmu) > struct pmu_event const *event =3D &test_event->ev= ent; > > if (!strcmp(event->name, alias->name)) { > + if (strcmp(pmu_name, test_event->matching= _pmu)) { > + pr_debug("testing aliases uncore = PMU %s: mismatched matching_pmu, %s vs %s\n", > + pmu_name, test_ev= ent->matching_pmu, pmu_name); > + continue; > + } > if (compare_alias_to_test_event(alias, > test_event, > pmu_name)) { > -- > 1.8.3.1 >