diff options
Diffstat (limited to 'tools/perf/tests/parse-events.c')
-rw-r--r-- | tools/perf/tests/parse-events.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 3b97ac018d5a..4a69c07f4101 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -1330,6 +1330,26 @@ static int test__checkevent_complex_name(struct perf_evlist *evlist) | |||
1330 | return 0; | 1330 | return 0; |
1331 | } | 1331 | } |
1332 | 1332 | ||
1333 | static int test__sym_event_slash(struct perf_evlist *evlist) | ||
1334 | { | ||
1335 | struct perf_evsel *evsel = perf_evlist__first(evlist); | ||
1336 | |||
1337 | TEST_ASSERT_VAL("wrong type", evsel->attr.type == PERF_TYPE_HARDWARE); | ||
1338 | TEST_ASSERT_VAL("wrong config", evsel->attr.config == PERF_COUNT_HW_CPU_CYCLES); | ||
1339 | TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); | ||
1340 | return 0; | ||
1341 | } | ||
1342 | |||
1343 | static int test__sym_event_dc(struct perf_evlist *evlist) | ||
1344 | { | ||
1345 | struct perf_evsel *evsel = perf_evlist__first(evlist); | ||
1346 | |||
1347 | TEST_ASSERT_VAL("wrong type", evsel->attr.type == PERF_TYPE_HARDWARE); | ||
1348 | TEST_ASSERT_VAL("wrong config", evsel->attr.config == PERF_COUNT_HW_CPU_CYCLES); | ||
1349 | TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); | ||
1350 | return 0; | ||
1351 | } | ||
1352 | |||
1333 | static int count_tracepoints(void) | 1353 | static int count_tracepoints(void) |
1334 | { | 1354 | { |
1335 | struct dirent *events_ent; | 1355 | struct dirent *events_ent; |
@@ -1670,6 +1690,16 @@ static struct evlist_test test__events[] = { | |||
1670 | .name = "cycles/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks'/Duk", | 1690 | .name = "cycles/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks'/Duk", |
1671 | .check = test__checkevent_complex_name, | 1691 | .check = test__checkevent_complex_name, |
1672 | .id = 53 | 1692 | .id = 53 |
1693 | }, | ||
1694 | { | ||
1695 | .name = "cycles//u", | ||
1696 | .check = test__sym_event_slash, | ||
1697 | .id = 54, | ||
1698 | }, | ||
1699 | { | ||
1700 | .name = "cycles:k", | ||
1701 | .check = test__sym_event_dc, | ||
1702 | .id = 55, | ||
1673 | } | 1703 | } |
1674 | }; | 1704 | }; |
1675 | 1705 | ||