[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230802074948.136468-8-yangjihong1@huawei.com>
Date: Wed, 2 Aug 2023 07:49:48 +0000
From: Yang Jihong <yangjihong1@...wei.com>
To: <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
<mark.rutland@....com>, <alexander.shishkin@...ux.intel.com>,
<jolsa@...nel.org>, <namhyung@...nel.org>, <irogers@...gle.com>,
<adrian.hunter@...el.com>, <kan.liang@...ux.intel.com>,
<james.clark@....com>, <tmricht@...ux.ibm.com>,
<ak@...ux.intel.com>, <anshuman.khandual@....com>,
<linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>
CC: <yangjihong1@...wei.com>
Subject: [PATCH v4 7/7] perf test: Add perf_event_attr test for record selected CPUs exclude_user
If all (non-dummy) evsel have exclude_user, system_wide sideband is not
needed. Add this test scenario.
Signed-off-by: Yang Jihong <yangjihong1@...wei.com>
---
.../perf/tests/attr/test-record-C0-all-kernel | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 tools/perf/tests/attr/test-record-C0-all-kernel
diff --git a/tools/perf/tests/attr/test-record-C0-all-kernel b/tools/perf/tests/attr/test-record-C0-all-kernel
new file mode 100644
index 000000000000..2d7549277c1e
--- /dev/null
+++ b/tools/perf/tests/attr/test-record-C0-all-kernel
@@ -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
Powered by blists - more mailing lists