Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp912515rwo; Sat, 22 Jul 2023 02:52:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9cyKfK6z3+e02Ac9ZKt0seHHRixPHRWBsSmYvhB+htzzuSxG5a9J5E32KouanGLVpDZvt X-Received: by 2002:a05:6808:1495:b0:3a3:6cb2:d5bf with SMTP id e21-20020a056808149500b003a36cb2d5bfmr6295134oiw.4.1690019573936; Sat, 22 Jul 2023 02:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690019573; cv=none; d=google.com; s=arc-20160816; b=Jfwc9v3RGk+5W/BHr++KIsBMu3Q58pT+JcJ6PBtyYUHCaGMaqvoXMu/2VpRvGPOuQl BCjUJ0KA/Cdu4UjOa2S3sJkMJtCnc9GYEsAghFAm1ZfQf3QrYaucsnqhFUDPRTNUgZV5 ElAn7UXHnHaWaxFuo0DJ71LnsTWeQRaBkI43tiYhGtGbp4DEvO0EwsfmBXAObe6BYkEN 4w/gLK7/t4+okHwsl37MdATNxem4k6cQFZHrQ0PbcMrs2bRxqoP6ly3FHjRUqkGY173k 8O434showyE1rqUTEX/Beki5OFuNVocbnh6QvaNMoToubZehhzfraMHZCOHAMgPOJqFz Ef/A== 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=Zem/PJvpqsD1FKKyEYOI52JTmedmKRuVus4omqbMp5Q=; fh=Ib1wi7jRbo+eNDLEErvWCJx+cnUm87PkGFthhdFf08Y=; b=tJnip36D7ULSjL2WKK2BWYwuUm7yEaGA7d6ebPdev+oh1/BQi8nWxpsDz+7UNcg9fC O25O9Cf9Pmw838+gKRfUSJYmO77w80i0ISKNT2aH+bFDzlK8mZ3faeZMfpPOx/FLuUoP y2Q0lJEsxy3fsyeAy88RbfHk1OSEYcu2ud6ZJuTrtCOfz7IMd2aV8z+jKpQhRAspWlkB sbqDoISLzcB5WmZLRLWG8I95yu7aihQfTTkU5SaccEA2hnInFrTPibWkWlh4sTM32jv+ L1iRcDl6UU0X9lbZ9WgWh0UWChJqCcF440ienxC0eF9NRRH0WCa4Mzv8gyiKIqlmwQiW yezA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a633409000000b00563938c58d1si1483189pga.270.2023.07.22.02.52.33; Sat, 22 Jul 2023 02:52:53 -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 S230041AbjGVJfK (ORCPT + 99 others); Sat, 22 Jul 2023 05:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbjGVJes (ORCPT ); Sat, 22 Jul 2023 05:34:48 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B85E730F1; Sat, 22 Jul 2023 02:34:47 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R7LpZ0cCkz18LVd; Sat, 22 Jul 2023 17:33:58 +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; Sat, 22 Jul 2023 17:34:44 +0800 From: Yang Jihong To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v3 7/7] perf test: Add perf_event_attr test for record selected CPUs exclude_user Date: Sat, 22 Jul 2023 09:32:19 +0000 Message-ID: <20230722093219.174898-8-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT In-Reply-To: <20230722093219.174898-1-yangjihong1@huawei.com> References: <20230722093219.174898-1-yangjihong1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.95] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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_H2,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 If all (non-dummy) evsel have exclude_user, system_wide sideband is not needed. Add this test scenario. Signed-off-by: Yang Jihong --- .../tests/attr/test-record-C0-exclude_user | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tools/perf/tests/attr/test-record-C0-exclude_user diff --git a/tools/perf/tests/attr/test-record-C0-exclude_user b/tools/perf/tests/attr/test-record-C0-exclude_user new file mode 100644 index 000000000000..2d7549277c1e --- /dev/null +++ b/tools/perf/tests/attr/test-record-C0-exclude_user @@ -0,0 +1,32 @@ +[config] +command = record +args = --no-bpf-event --all-kernel -C 0 kill >/dev/null 2>&1 +ret = 1 + +[event:base-record] +cpu=0 + +# no enable on exec for CPU attached +enable_on_exec=0 + +# PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | +# PERF_SAMPLE_PERIOD | PERF_SAMPLE_IDENTIFIER +# + PERF_SAMPLE_CPU added by -C 0 +sample_type=65927 + +# Dummy event handles mmaps, comm and task. +mmap=0 +comm=0 +task=0 + +# exclude_user for all-kernel option +exclude_user=1 + +[event:system-wide-dummy] + +# system_wide is not need for all (non-dummy) events have exclude_user +cpu=0 + +# exclude_user for all-kernel option +exclude_user=1 +exclude_kernel=0 -- 2.30.GIT