From nobody Thu Sep 11 12:49:20 2025 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 E0801CA0FE3 for ; Mon, 4 Sep 2023 02:37:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351042AbjIDChC (ORCPT ); Sun, 3 Sep 2023 22:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350938AbjIDCg4 (ORCPT ); Sun, 3 Sep 2023 22:36:56 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E0BB10A; Sun, 3 Sep 2023 19:36:53 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RfCNQ5RbTztS56; Mon, 4 Sep 2023 10:32:54 +0800 (CST) Received: from localhost.localdomain (10.67.174.95) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 4 Sep 2023 10:36:50 +0800 From: Yang Jihong To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v8 6/6] perf test: Add perf_event_attr test for record dummy event Date: Mon, 4 Sep 2023 02:33:40 +0000 Message-ID: <20230904023340.12707-7-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT In-Reply-To: <20230904023340.12707-1-yangjihong1@huawei.com> References: <20230904023340.12707-1-yangjihong1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.174.95] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" If only dummy event is recorded, tracking event is not needed. Add this test scenario. Test result: # ./perf test list 2>&1 | grep 'Setup struct perf_event_attr' 17: Setup struct perf_event_attr # ./perf test 17 -v 17: Setup struct perf_event_attr : --- start --- test child forked, pid 720198 running './tests/attr/test-record-dummy-C0' test child finished with 0 ---- end ---- Setup struct perf_event_attr: Ok Signed-off-by: Yang Jihong --- tools/perf/tests/attr/test-record-dummy-C0 | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tools/perf/tests/attr/test-record-dummy-C0 diff --git a/tools/perf/tests/attr/test-record-dummy-C0 b/tools/perf/tests/= attr/test-record-dummy-C0 new file mode 100644 index 000000000000..83ca4e373acd --- /dev/null +++ b/tools/perf/tests/attr/test-record-dummy-C0 @@ -0,0 +1,55 @@ +[config] +command =3D record +args =3D --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1 +ret =3D 1 + +[event] +fd=3D1 +group_fd=3D-1 +cpu=3D0 +pid=3D-1 +flags=3D8 +type=3D1 +size=3D136 +config=3D9 +sample_period=3D4000 +# PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | +# PERF_SAMPLE_PERIOD +# + PERF_SAMPLE_CPU added by -C 0 +sample_type=3D391 +read_format=3D4 +disabled=3D0 +inherit=3D1 +pinned=3D0 +exclusive=3D0 +exclude_user=3D0 +exclude_kernel=3D0 +exclude_hv=3D0 +exclude_idle=3D0 +mmap=3D1 +comm=3D1 +freq=3D1 +inherit_stat=3D0 +enable_on_exec=3D0 +task=3D1 +watermark=3D0 +precise_ip=3D0 +mmap_data=3D0 +sample_id_all=3D1 +exclude_host=3D0 +exclude_guest=3D1 +exclude_callchain_kernel=3D0 +exclude_callchain_user=3D0 +mmap2=3D1 +comm_exec=3D1 +context_switch=3D0 +write_backward=3D0 +namespaces=3D0 +use_clockid=3D0 +wakeup_events=3D0 +bp_type=3D0 +config1=3D0 +config2=3D0 +branch_sample_type=3D0 +sample_regs_user=3D0 +sample_stack_user=3D0 --=20 2.30.GIT