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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3830C433F5 for ; Tue, 28 Sep 2021 18:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C748261352 for ; Tue, 28 Sep 2021 18:03:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242177AbhI1SFA (ORCPT ); Tue, 28 Sep 2021 14:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242184AbhI1SE6 (ORCPT ); Tue, 28 Sep 2021 14:04:58 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58443C06161C for ; Tue, 28 Sep 2021 11:03:19 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id r9so2768230ile.5 for ; Tue, 28 Sep 2021 11:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0rMKGqfvpKADGijyzOO7wsz9YISYB+sEd0g/DKdxxfY=; b=rV8huODsmqtc+YwcERseBQLZTTiKFGJS1T3uRfmst8e/cu08T9WDo4yp4LkUHu00Xd 4FT1ONxxQBjxyaEyGYd1Z1OJz+F9kiXBDHn06ekAn7Ro36twz630tRFyYMXC1+ITLbb+ +J9SUZOdMvpselY7dL9Yb4/9Imlq4PAMeJ6sLknXGHOMN1S18FdfShaKG39qV58kRSAV nZ+em67fr1mVssALhS4EreOHa3JaMsmkIuSutPRigzrPKPkxdkbDKnJUKHbaOkPpnF71 eiqaPZRKWJlCB+/Xy5/5nx99Vh7XaAJsN5ySvQ+uIr7tOidnK+pTiR43HspPOTevt0SZ d10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0rMKGqfvpKADGijyzOO7wsz9YISYB+sEd0g/DKdxxfY=; b=5lHPJTmIeJEke4SDTUHPJwLYGv/DN57qFOTZJT8uG5FnF0rYy4eIRRUtF9yIY66OJe G88evFEXhsNncG/9CuGcKE67k/bGH6K9g/g/jdK8NDU6OL+8wFnxmigzdRixVdkvz4UP ALUKRdFKsQHWANTIwPTgPTPQo7jcZvx02LYzGpzisby4331zmOQ5Cn6VoqxsGmtbEG2G zbctrLaYeiG42516/m4FVR7v4sBpw/+hKdE3bXRZdrH1S2+ZiUpmK09aAM+ziVoZ4K7N FWrRcJVE7EJPXhxXVoQUMOtbaAOIo+E2eyaBXiosLJp6YjPTg5uk/r/EnnBBjfqaGPB0 C4iQ== X-Gm-Message-State: AOAM532rXH3mXVimSiawEcPPXnsefDysyP7pBZ5/Zj4OHsNsAbQBETcn X2GWOdOCw6ghO76K0uduaBB+mS4EGN6Hw2Txz4Ep0w== X-Google-Smtp-Source: ABdhPJyGQcrfddYeDyjtTTdGT0OT2E+gKYLkheP4oVW6r3YkFTtPieXnNwPm5IgHSHsN0wYdQ1yzRQjf1MhLmn4lOZA= X-Received: by 2002:a05:6e02:17ce:: with SMTP id z14mr5295608ilu.89.1632852198617; Tue, 28 Sep 2021 11:03:18 -0700 (PDT) MIME-Version: 1.0 References: <1631795665-240946-1-git-send-email-john.garry@huawei.com> <1631795665-240946-5-git-send-email-john.garry@huawei.com> In-Reply-To: <1631795665-240946-5-git-send-email-john.garry@huawei.com> From: Ian Rogers Date: Tue, 28 Sep 2021 11:03:04 -0700 Message-ID: Subject: Re: [PATCH 4/5] perf test: Add pmu-event test for event described as "config=" To: John Garry Cc: will@kernel.org, mathieu.poirier@linaro.org, leo.yan@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, zhangshaokun@hisilicon.com, liuqi115@huawei.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 5:39 AM John Garry wrote: > > Add a new test event for a system event whose event member is in form > "config=". > > Signed-off-by: John Garry Acked-by: Ian Rogers Thanks, Ian > --- > .../arch/test/test_soc/sys/uncore.json | 7 ++++++ > tools/perf/tests/pmu-events.c | 25 +++++++++++++++++++ > 2 files changed, 32 insertions(+) > > diff --git a/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json b/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json > index 0f681a6e10ea..c7e7528db315 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 > @@ -6,4 +6,11 @@ > "Unit": "sys_ddr_pmu", > "Compat": "v8" > }, > + { > + "BriefDescription": "ccn read-cycles event", > + "ConfigCode": "0x2c", > + "EventName": "sys_ccn_pmu.read_cycles", > + "Unit": "sys_ccn_pmu", > + "Compat": "0x01" > + } > ] > diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c > index adfc17f51c7b..f14266a4c513 100644 > --- a/tools/perf/tests/pmu-events.c > +++ b/tools/perf/tests/pmu-events.c > @@ -208,8 +208,23 @@ static const struct perf_pmu_test_event sys_ddr_pmu_write_cycles = { > .matching_pmu = "uncore_sys_ddr_pmu", > }; > > +static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles = { > + .event = { > + .name = "sys_ccn_pmu.read_cycles", > + .event = "config=0x2c", > + .desc = "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", > + .topic = "uncore", > + .pmu = "uncore_sys_ccn_pmu", > + .compat = "0x01", > + }, > + .alias_str = "config=0x2c", > + .alias_long_desc = "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", > + .matching_pmu = "uncore_sys_ccn_pmu", > +}; > + > static const struct perf_pmu_test_event *sys_events[] = { > &sys_ddr_pmu_write_cycles, > + &sys_ccn_pmu_read_cycles, > NULL > }; > > @@ -677,6 +692,16 @@ static struct perf_pmu_test_pmu test_pmus[] = { > &sys_ddr_pmu_write_cycles, > }, > }, > + { > + .pmu = { > + .name = (char *)"uncore_sys_ccn_pmu4", > + .is_uncore = 1, > + .id = (char *)"0x01", > + }, > + .aliases = { > + &sys_ccn_pmu_read_cycles, > + }, > + }, > }; > > /* Test that aliases generated are as expected */ > -- > 2.26.2 > 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 738BBC433EF for ; Tue, 28 Sep 2021 18:05:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EA996135A for ; Tue, 28 Sep 2021 18:05:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2EA996135A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=36FuZcvaOH+rgOtpt7dngvzxXs2zbTZ7LcnEDKXlbwo=; b=MoVm6eLElAbbuo 3weIVxtyHVEtPfQ5P7uyhBq3/pbkOfPwLlAcuQ4eDX06SKCQ75FtNBiAYUz9jDyqMy43wqkw4MCS2 zYhAyjsbOzlPWgBlnMpMxM9+5/FTMh3xUByT3z7sc8LdbXMWC6hxwdJo7MHid5jv+yu5wPPULGV9s /1dyHPlNJNMgJ/XumVApr8zfAd+LC6uBAKqpkZ4567iYTIv8leXrH8K9y7IAWmy3+VxcTnC62ziQo sqopp0gayAUJ4Bi3wS+TUMn6TW1fJLb3ejTXMJfMqJ3CwyaRByx05OBlGFhQYCqhn/lvdayKVP5SQ Ahopxn33DbVxS6J0r4lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHRt-008M9R-6F; Tue, 28 Sep 2021 18:03:25 +0000 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHRn-008M7Z-C3 for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:03:20 +0000 Received: by mail-il1-x136.google.com with SMTP id q6so10375131ilm.3 for ; Tue, 28 Sep 2021 11:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0rMKGqfvpKADGijyzOO7wsz9YISYB+sEd0g/DKdxxfY=; b=rV8huODsmqtc+YwcERseBQLZTTiKFGJS1T3uRfmst8e/cu08T9WDo4yp4LkUHu00Xd 4FT1ONxxQBjxyaEyGYd1Z1OJz+F9kiXBDHn06ekAn7Ro36twz630tRFyYMXC1+ITLbb+ +J9SUZOdMvpselY7dL9Yb4/9Imlq4PAMeJ6sLknXGHOMN1S18FdfShaKG39qV58kRSAV nZ+em67fr1mVssALhS4EreOHa3JaMsmkIuSutPRigzrPKPkxdkbDKnJUKHbaOkPpnF71 eiqaPZRKWJlCB+/Xy5/5nx99Vh7XaAJsN5ySvQ+uIr7tOidnK+pTiR43HspPOTevt0SZ d10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0rMKGqfvpKADGijyzOO7wsz9YISYB+sEd0g/DKdxxfY=; b=KHMl+8dJP64TsXFEwJRc0k/X/5rkUkPeRSMrG8qYWd1iHb4XDuYCF/6guBFtILWdTE bQCNYw2R1YVHXp3nB+5xFbb7wYk1+onhjQX2N9K+Kuf4/qzTFnoNThTxTMUx/YlRgs3F 686tTyDMF0Bm4a7T3GjoukbQdI91uXh+mHnpajCgwubaEHto6vpAPSUEHxrnia8SA2wf nJkECS7pszcEYvjiIFWKJj/OZIbiTV/uYmE6eEcdNx+sGreTbN8Q2+kDOWvQp7y3AJQf 2DvH13g/yZNCP0F3zGVDHYz70nmzoqfBss96lpZHYQO1Ullb2z8O24U3rZ1idznWOX3Z KNRw== X-Gm-Message-State: AOAM533OXGtYX1s3/B3MTGv//7f1gOWi0/dYsmrx6hCMIIIYMGZ6CSK9 KMYxafdYocve9nZfcezjMH5NjmSMeX4T2+CENbChSA== X-Google-Smtp-Source: ABdhPJyGQcrfddYeDyjtTTdGT0OT2E+gKYLkheP4oVW6r3YkFTtPieXnNwPm5IgHSHsN0wYdQ1yzRQjf1MhLmn4lOZA= X-Received: by 2002:a05:6e02:17ce:: with SMTP id z14mr5295608ilu.89.1632852198617; Tue, 28 Sep 2021 11:03:18 -0700 (PDT) MIME-Version: 1.0 References: <1631795665-240946-1-git-send-email-john.garry@huawei.com> <1631795665-240946-5-git-send-email-john.garry@huawei.com> In-Reply-To: <1631795665-240946-5-git-send-email-john.garry@huawei.com> From: Ian Rogers Date: Tue, 28 Sep 2021 11:03:04 -0700 Message-ID: Subject: Re: [PATCH 4/5] perf test: Add pmu-event test for event described as "config=" To: John Garry Cc: will@kernel.org, mathieu.poirier@linaro.org, leo.yan@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, zhangshaokun@hisilicon.com, liuqi115@huawei.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_110319_437702_FBE28E32 X-CRM114-Status: GOOD ( 19.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 16, 2021 at 5:39 AM John Garry wrote: > > Add a new test event for a system event whose event member is in form > "config=". > > Signed-off-by: John Garry Acked-by: Ian Rogers Thanks, Ian > --- > .../arch/test/test_soc/sys/uncore.json | 7 ++++++ > tools/perf/tests/pmu-events.c | 25 +++++++++++++++++++ > 2 files changed, 32 insertions(+) > > diff --git a/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json b/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json > index 0f681a6e10ea..c7e7528db315 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 > @@ -6,4 +6,11 @@ > "Unit": "sys_ddr_pmu", > "Compat": "v8" > }, > + { > + "BriefDescription": "ccn read-cycles event", > + "ConfigCode": "0x2c", > + "EventName": "sys_ccn_pmu.read_cycles", > + "Unit": "sys_ccn_pmu", > + "Compat": "0x01" > + } > ] > diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c > index adfc17f51c7b..f14266a4c513 100644 > --- a/tools/perf/tests/pmu-events.c > +++ b/tools/perf/tests/pmu-events.c > @@ -208,8 +208,23 @@ static const struct perf_pmu_test_event sys_ddr_pmu_write_cycles = { > .matching_pmu = "uncore_sys_ddr_pmu", > }; > > +static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles = { > + .event = { > + .name = "sys_ccn_pmu.read_cycles", > + .event = "config=0x2c", > + .desc = "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", > + .topic = "uncore", > + .pmu = "uncore_sys_ccn_pmu", > + .compat = "0x01", > + }, > + .alias_str = "config=0x2c", > + .alias_long_desc = "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", > + .matching_pmu = "uncore_sys_ccn_pmu", > +}; > + > static const struct perf_pmu_test_event *sys_events[] = { > &sys_ddr_pmu_write_cycles, > + &sys_ccn_pmu_read_cycles, > NULL > }; > > @@ -677,6 +692,16 @@ static struct perf_pmu_test_pmu test_pmus[] = { > &sys_ddr_pmu_write_cycles, > }, > }, > + { > + .pmu = { > + .name = (char *)"uncore_sys_ccn_pmu4", > + .is_uncore = 1, > + .id = (char *)"0x01", > + }, > + .aliases = { > + &sys_ccn_pmu_read_cycles, > + }, > + }, > }; > > /* Test that aliases generated are as expected */ > -- > 2.26.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel