• Home
  • Raw
  • Download

Lines Matching +full:cpu +full:- +full:nr

1 // SPDX-License-Identifier: GPL-2.0
6 #include "util/synthetic-events.h"
19 struct perf_record_cpu_map *map_event = &event->cpu_map; in process_event_mask()
25 data = &map_event->data; in process_event_mask()
27 TEST_ASSERT_VAL("wrong type", data->type == PERF_CPU_MAP__MASK); in process_event_mask()
29 mask = (struct perf_record_record_cpu_map *)data->data; in process_event_mask()
31 TEST_ASSERT_VAL("wrong nr", mask->nr == 1); in process_event_mask()
34 TEST_ASSERT_VAL("wrong cpu", test_bit(i, mask->mask)); in process_event_mask()
38 TEST_ASSERT_VAL("wrong nr", map->nr == 20); in process_event_mask()
41 TEST_ASSERT_VAL("wrong cpu", map->map[i] == i); in process_event_mask()
53 struct perf_record_cpu_map *map_event = &event->cpu_map; in process_event_cpus()
58 data = &map_event->data; in process_event_cpus()
60 TEST_ASSERT_VAL("wrong type", data->type == PERF_CPU_MAP__CPUS); in process_event_cpus()
62 cpus = (struct cpu_map_entries *)data->data; in process_event_cpus()
64 TEST_ASSERT_VAL("wrong nr", cpus->nr == 2); in process_event_cpus()
65 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[0] == 1); in process_event_cpus()
66 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[1] == 256); in process_event_cpus()
69 TEST_ASSERT_VAL("wrong nr", map->nr == 2); in process_event_cpus()
70 TEST_ASSERT_VAL("wrong cpu", map->map[0] == 1); in process_event_cpus()
71 TEST_ASSERT_VAL("wrong cpu", map->map[1] == 256); in process_event_cpus()
72 TEST_ASSERT_VAL("wrong refcnt", refcount_read(&map->refcnt) == 1); in process_event_cpus()
90 /* This one is better stores in cpu values. */ in test__cpu_map_synthesize()
106 return -1; in cpu_map_print()
116 TEST_ASSERT_VAL("failed to convert map", cpu_map_print("1,3,5,7,9,11,13,15,17,19,21-40")); in test__cpu_map_print()
117 TEST_ASSERT_VAL("failed to convert map", cpu_map_print("2-5")); in test__cpu_map_print()
118 TEST_ASSERT_VAL("failed to convert map", cpu_map_print("1,3-6,8-10,24,35-37")); in test__cpu_map_print()
119 TEST_ASSERT_VAL("failed to convert map", cpu_map_print("1,3-6,8-10,24,35-37")); in test__cpu_map_print()
120 TEST_ASSERT_VAL("failed to convert map", cpu_map_print("1-10,12-20,22-30,32-40")); in test__cpu_map_print()
131 TEST_ASSERT_VAL("failed to merge map: bad nr", c->nr == 5); in test__cpu_map_merge()
133 TEST_ASSERT_VAL("failed to merge map: bad result", !strcmp(buf, "1-2,4-5,7")); in test__cpu_map_merge()