Lines Matching +full:on +full:- +full:die
1 // SPDX-License-Identifier: GPL-2.0
14 #define TEMPL "/tmp/perf-test-XXXXXX"
26 return -1; in get_temp()
44 session->evlist = evlist__new_default(); in session_write_header()
45 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header()
47 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); in session_write_header()
48 perf_header__set_feat(&session->header, HEADER_NRCPUS); in session_write_header()
49 perf_header__set_feat(&session->header, HEADER_ARCH); in session_write_header()
51 session->header.data_size += DATA_SIZE; in session_write_header()
54 !perf_session__write_header(session, session->evlist, data.file.fd, true)); in session_write_header()
56 evlist__delete(session->evlist); in session_write_header()
77 /* On platforms with large numbers of CPUs process_cpu_topology() in check_cpu_topology()
81 * Example: On s390 in check_cpu_topology()
82 * CPU 0 is on core_id 0 and physical_package_id 6 in check_cpu_topology()
83 * CPU 1 is on core_id 1 and physical_package_id 3 in check_cpu_topology()
87 * This actually depends on the configuration. in check_cpu_topology()
96 * run this test on those platforms. in check_cpu_topology()
98 if (!session->header.env.cpu in check_cpu_topology()
99 && strncmp(session->header.env.arch, "s390", 4) in check_cpu_topology()
100 && strncmp(session->header.env.arch, "aarch64", 7)) in check_cpu_topology()
106 * physical_package_id will be set to -1. Hence skip this in check_cpu_topology()
107 * test if physical_package_id returns -1 for cpu from perf_cpu_map. in check_cpu_topology()
109 if (!strncmp(session->header.env.arch, "ppc64le", 7)) { in check_cpu_topology()
110 if (cpu__get_socket_id(perf_cpu_map__cpu(map, 0)) == -1) in check_cpu_topology()
114 TEST_ASSERT_VAL("Session header CPU map not set", session->header.env.cpu); in check_cpu_topology()
116 for (i = 0; i < session->header.env.nr_cpus_avail; i++) { in check_cpu_topology()
121 session->header.env.cpu[i].core_id, in check_cpu_topology()
122 session->header.env.cpu[i].socket_id); in check_cpu_topology()
125 // Test that CPU ID contains socket, die, core and CPU in check_cpu_topology()
128 TEST_ASSERT_VAL("Cpu map - CPU ID doesn't match", in check_cpu_topology()
131 TEST_ASSERT_VAL("Cpu map - Core ID doesn't match", in check_cpu_topology()
132 session->header.env.cpu[cpu.cpu].core_id == id.core); in check_cpu_topology()
133 TEST_ASSERT_VAL("Cpu map - Socket ID doesn't match", in check_cpu_topology()
134 session->header.env.cpu[cpu.cpu].socket_id == in check_cpu_topology()
137 TEST_ASSERT_VAL("Cpu map - Die ID doesn't match", in check_cpu_topology()
138 session->header.env.cpu[cpu.cpu].die_id == id.die); in check_cpu_topology()
139 TEST_ASSERT_VAL("Cpu map - Node ID is set", id.node == -1); in check_cpu_topology()
140 TEST_ASSERT_VAL("Cpu map - Thread IDX is set", id.thread_idx == -1); in check_cpu_topology()
143 // Test that core ID contains socket, die and core in check_cpu_topology()
146 TEST_ASSERT_VAL("Core map - Core ID doesn't match", in check_cpu_topology()
147 session->header.env.cpu[cpu.cpu].core_id == id.core); in check_cpu_topology()
149 TEST_ASSERT_VAL("Core map - Socket ID doesn't match", in check_cpu_topology()
150 session->header.env.cpu[cpu.cpu].socket_id == in check_cpu_topology()
153 TEST_ASSERT_VAL("Core map - Die ID doesn't match", in check_cpu_topology()
154 session->header.env.cpu[cpu.cpu].die_id == id.die); in check_cpu_topology()
155 TEST_ASSERT_VAL("Core map - Node ID is set", id.node == -1); in check_cpu_topology()
156 TEST_ASSERT_VAL("Core map - Thread IDX is set", id.thread_idx == -1); in check_cpu_topology()
159 // Test that die ID contains socket and die in check_cpu_topology()
162 TEST_ASSERT_VAL("Die map - Socket ID doesn't match", in check_cpu_topology()
163 session->header.env.cpu[cpu.cpu].socket_id == in check_cpu_topology()
166 TEST_ASSERT_VAL("Die map - Die ID doesn't match", in check_cpu_topology()
167 session->header.env.cpu[cpu.cpu].die_id == id.die); in check_cpu_topology()
169 TEST_ASSERT_VAL("Die map - Node ID is set", id.node == -1); in check_cpu_topology()
170 TEST_ASSERT_VAL("Die map - Core is set", id.core == -1); in check_cpu_topology()
171 TEST_ASSERT_VAL("Die map - CPU is set", id.cpu.cpu == -1); in check_cpu_topology()
172 TEST_ASSERT_VAL("Die map - Thread IDX is set", id.thread_idx == -1); in check_cpu_topology()
178 TEST_ASSERT_VAL("Socket map - Socket ID doesn't match", in check_cpu_topology()
179 session->header.env.cpu[cpu.cpu].socket_id == in check_cpu_topology()
182 TEST_ASSERT_VAL("Socket map - Node ID is set", id.node == -1); in check_cpu_topology()
183 TEST_ASSERT_VAL("Socket map - Die ID is set", id.die == -1); in check_cpu_topology()
184 TEST_ASSERT_VAL("Socket map - Core is set", id.core == -1); in check_cpu_topology()
185 TEST_ASSERT_VAL("Socket map - CPU is set", id.cpu.cpu == -1); in check_cpu_topology()
186 TEST_ASSERT_VAL("Socket map - Thread IDX is set", id.thread_idx == -1); in check_cpu_topology()
192 TEST_ASSERT_VAL("Node map - Node ID doesn't match", in check_cpu_topology()
194 TEST_ASSERT_VAL("Node map - Socket is set", id.socket == -1); in check_cpu_topology()
195 TEST_ASSERT_VAL("Node map - Die ID is set", id.die == -1); in check_cpu_topology()
196 TEST_ASSERT_VAL("Node map - Core is set", id.core == -1); in check_cpu_topology()
197 TEST_ASSERT_VAL("Node map - CPU is set", id.cpu.cpu == -1); in check_cpu_topology()
198 TEST_ASSERT_VAL("Node map - Thread IDX is set", id.thread_idx == -1); in check_cpu_topology()