From patchwork Fri Aug 4 02:07:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Jihong X-Patchwork-Id: 130916 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1530580vqx; Thu, 3 Aug 2023 19:22:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlGomjLohei/TdwWT2nNxS+bGGflpj+eTBsEd72wm/yuC6L3+VBFPj/R6m9DdlglCoj934h6 X-Received: by 2002:a17:906:20d0:b0:993:eed1:8f7 with SMTP id c16-20020a17090620d000b00993eed108f7mr14627177ejc.3.1691115744667; Thu, 03 Aug 2023 19:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691115744; cv=none; d=google.com; s=arc-20160816; b=J6GxNEcEcruhd+HIv9vaV9k0a9CJ3FmeDIq9UgEB0Zikq6xusGR5vqEzbz5t7Wqzx4 7pBDicHPOY52nj6lHwNmFN4y2rySVz5kOaPUbRYEgmEJEYzobTHsOJC89ij78mN7p6QK ZoSw6/2dU3ELUiKycxmGlUwA4f2Vg+o5yAp38+1xz/KL7Q4H7GJBsxLgP+0fUc8EoENI JpJTM7ncqrrN12ZDVa+sBwe5qQ/s57cf4HyAvtIMT2orNdCbp0/dt47uv7ykv+guaQHe SY0AXC/5BpqXaP69zdZRyCE34dFXgyoanEZnDubI8VuP/ZQHEN0FHbjYu1g5rSTVmD7B OyVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rlpFh+0WlV9zQNK8fvdxNzunIkW3lUo5cRy2F8JYC4g=; fh=Ib1wi7jRbo+eNDLEErvWCJx+cnUm87PkGFthhdFf08Y=; b=NhuDK0wNE1KxsTVL7E9JBSE7ryQBoQonCQbRCvmbRf3OgpZa5YxfPmRD6gGX/Xt1J/ zb+w3cSPbT3crEqlnBzCTKVJ/q0tP9trbTLrUlpLfqYxSIXxoslMsKH2X75D7x9+qetZ rFnDfkGlQfgp/i0H/MsMYSm324BxKno7uvXN6m+UKSX9oxNuP8crEwkqH8Q81ZrCWdDF NjSYegWMIc8pIlHJWEyDzxB5FMlYC02uYLAhFvYBVP9W8ThvGV+2FHdzFprA7opltFZK tn71gBN8bOtA7yTpffxo1KYONBi0e4f4+2Jgk8xsfdkMheorbGamT3O+e8wriVOpxjfz 4BNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a170906114800b0098761ff7860si525152eja.635.2023.08.03.19.22.01; Thu, 03 Aug 2023 19:22:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233098AbjHDCKl (ORCPT + 99 others); Thu, 3 Aug 2023 22:10:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231903AbjHDCKV (ORCPT ); Thu, 3 Aug 2023 22:10:21 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB78E448F; Thu, 3 Aug 2023 19:10:20 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RH8Jc0kMczVjn8; Fri, 4 Aug 2023 10:08:32 +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; Fri, 4 Aug 2023 10:10:18 +0800 From: Yang Jihong To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v5 5/7] perf test: Update base-record & system-wide-dummy attr expected values for test-record-C0 Date: Fri, 4 Aug 2023 02:07:39 +0000 Message-ID: <20230804020741.99806-6-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT In-Reply-To: <20230804020741.99806-1-yangjihong1@huawei.com> References: <20230804020741.99806-1-yangjihong1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.174.95] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773263383101238729 X-GMAIL-MSGID: 1773263383101238729 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 Tested-by: Adrian Hunter --- 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/attr/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=8 type=1 size=136 config=9 -sample_period=4000 -sample_type=455 +sample_period=1 +# PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | +# PERF_SAMPLE_CPU | PERF_SAMPLE_IDENTIFIER +sample_type=65671 read_format=4|20 # Event will be enabled right away. disabled=0 @@ -18,12 +20,12 @@ inherit=1 pinned=0 exclusive=0 exclude_user=0 -exclude_kernel=0 -exclude_hv=0 +exclude_kernel=1 +exclude_hv=1 exclude_idle=0 mmap=1 comm=1 -freq=1 +freq=0 inherit_stat=0 enable_on_exec=0 task=1 @@ -32,7 +34,7 @@ precise_ip=0 mmap_data=0 sample_id_all=1 exclude_host=0 -exclude_guest=0 +exclude_guest=1 exclude_callchain_kernel=0 exclude_callchain_user=0 mmap2=1 diff --git a/tools/perf/tests/attr/test-record-C0 b/tools/perf/tests/attr/test-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=0 enable_on_exec=0 # 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=455 +sample_type=65927 # Dummy event handles mmaps, comm and task. mmap=0