From nobody Thu Sep 11 12:49:21 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 884DCC00528 for ; Wed, 2 Aug 2023 07:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233798AbjHBHzO (ORCPT ); Wed, 2 Aug 2023 03:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233700AbjHBHyb (ORCPT ); Wed, 2 Aug 2023 03:54:31 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DE674EFE; Wed, 2 Aug 2023 00:52:27 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RG40J4DZwzVjxw; Wed, 2 Aug 2023 15:50:40 +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.27; Wed, 2 Aug 2023 15:52:24 +0800 From: Yang Jihong To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v4 5/7] perf test: Update base-record & system-wide-dummy attr expected values for test-record-C0 Date: Wed, 2 Aug 2023 07:49:46 +0000 Message-ID: <20230802074948.136468-6-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT In-Reply-To: <20230802074948.136468-1-yangjihong1@huawei.com> References: <20230802074948.136468-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" 1. Because a dummy sideband event is added to the sampling of specified CPUs. When evlist contains evsel of different sample_type, evlist__config() will change the default PERF_SAMPLE_ID bit to PERF_SAMPLE_IDENTIFICATION bit. The attr sample_type expected value of base-record and system-wide-dummy in test-record-C0 needs to be updated. 2. The perf record uses evlist__add_aux_dummy() instead of evlist__add_dummy() to add a dummy event. The expected value of system-wide-dummy attr needs to be updated. The perf test result is as follows: # ./perf test list 2>&1 | grep 'Setup struct perf_event_attr' 17: Setup struct perf_event_attr # ./perf test 17 17: Setup struct perf_event_attr : Ok Signed-off-by: Yang Jihong --- tools/perf/tests/attr/system-wide-dummy | 14 ++++++++------ tools/perf/tests/attr/test-record-C0 | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/perf/tests/attr/system-wide-dummy b/tools/perf/tests/att= r/system-wide-dummy index 2f3e3eb728eb..a1e1d6a263bf 100644 --- a/tools/perf/tests/attr/system-wide-dummy +++ b/tools/perf/tests/attr/system-wide-dummy @@ -9,8 +9,10 @@ flags=3D8 type=3D1 size=3D136 config=3D9 -sample_period=3D4000 -sample_type=3D455 +sample_period=3D1 +# PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | +# PERF_SAMPLE_CPU | PERF_SAMPLE_IDENTIFIER +sample_type=3D65671 read_format=3D4|20 # Event will be enabled right away. disabled=3D0 @@ -18,12 +20,12 @@ inherit=3D1 pinned=3D0 exclusive=3D0 exclude_user=3D0 -exclude_kernel=3D0 -exclude_hv=3D0 +exclude_kernel=3D1 +exclude_hv=3D1 exclude_idle=3D0 mmap=3D1 comm=3D1 -freq=3D1 +freq=3D0 inherit_stat=3D0 enable_on_exec=3D0 task=3D1 @@ -32,7 +34,7 @@ precise_ip=3D0 mmap_data=3D0 sample_id_all=3D1 exclude_host=3D0 -exclude_guest=3D0 +exclude_guest=3D1 exclude_callchain_kernel=3D0 exclude_callchain_user=3D0 mmap2=3D1 diff --git a/tools/perf/tests/attr/test-record-C0 b/tools/perf/tests/attr/t= est-record-C0 index 317730b906dd..198e8429a1bf 100644 --- a/tools/perf/tests/attr/test-record-C0 +++ b/tools/perf/tests/attr/test-record-C0 @@ -10,9 +10,9 @@ cpu=3D0 enable_on_exec=3D0 =20 # PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | -# PERF_SAMPLE_ID | PERF_SAMPLE_PERIOD +# PERF_SAMPLE_PERIOD | PERF_SAMPLE_IDENTIFIER # + PERF_SAMPLE_CPU added by -C 0 -sample_type=3D455 +sample_type=3D65927 =20 # Dummy event handles mmaps, comm and task. mmap=3D0 --=20 2.30.GIT