Lines Matching +full:attr +full:- +full:cnt +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0
2 #include "arch-tests.h"
12 return (evsel->core.attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_config()
17 return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_perf_config()
22 return (evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT) == expected_config; in test_hybrid_type()
29 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_hw_event_with_pmu()
30 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_event_with_pmu()
41 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_hw_group_event()
42 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_group_event()
48 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_group_event()
60 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_sw_hw_group_event()
61 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__hybrid_sw_hw_group_event()
65 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_sw_hw_group_event()
77 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_hw_sw_group_event()
78 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_hw_sw_group_event()
84 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__hybrid_hw_sw_group_event()
94 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_group_modifier1()
95 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_group_modifier1()
99 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__hybrid_group_modifier1()
100 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__hybrid_group_modifier1()
103 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__hybrid_group_modifier1()
107 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__hybrid_group_modifier1()
108 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__hybrid_group_modifier1()
116 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__hybrid_raw1()
117 struct perf_pmu *pmu = perf_pmus__find_by_type(evsel->attr.type); in test__hybrid_raw1()
120 TEST_ASSERT_VAL("unexpected pmu", !strncmp(pmu->name, "cpu_", 4)); in test__hybrid_raw1()
130 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_raw2()
131 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__hybrid_raw2()
140 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_cache_event()
141 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HW_CACHE == evsel->core.attr.type); in test__hybrid_cache_event()
142 TEST_ASSERT_VAL("wrong config", 0x2 == (evsel->core.attr.config & 0xffffffff)); in test__hybrid_cache_event()
151 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_pmu()
152 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu()
153 TEST_ASSERT_VAL("wrong config", 10 == evsel->core.attr.config); in test__checkevent_pmu()
154 TEST_ASSERT_VAL("wrong config1", 1 == evsel->core.attr.config1); in test__checkevent_pmu()
155 TEST_ASSERT_VAL("wrong config2", 3 == evsel->core.attr.config2); in test__checkevent_pmu()
156 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_pmu()
161 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu()
167 const char *name; member
174 .name = "cpu_core/cpu-cycles/",
179 .name = "{cpu_core/cpu-cycles/,cpu_core/instructions/}",
184 .name = "{cpu-clock,cpu_core/cpu-cycles/}",
189 .name = "{cpu_core/cpu-cycles/,cpu-clock}",
194 .name = "{cpu_core/cpu-cycles/k,cpu_core/instructions/u}",
199 .name = "r1a",
204 .name = "cpu_core/r1a/",
209 .name = "cpu_core/config=10,config1,config2=3,period=1000/u",
214 .name = "cpu_core/LLC-loads/",
226 if (e->valid && !e->valid()) { in test_event()
237 ret = parse_events(evlist, e->name, &err); in test_event()
240 e->name, ret, err.str); in test_event()
241 parse_events_error__print(&err, e->name); in test_event()
246 ret = e->check(evlist); in test_event()
263 static int test_events(const struct evlist_test *events, int cnt) in test_events() argument
267 for (int i = 0; i < cnt; i++) { in test_events()
271 pr_debug("running test %d '%s'\n", i, e->name); in test_events()
274 pr_debug("Event test failure: test %d '%s'", i, e->name); in test_events()