// Test that die ID contains socket and die
for (i = 0; i < map->nr; i++) {
- id = cpu_map__get_die(map, i, NULL);
+ id = cpu_map__get_die_aggr_by_cpu(perf_cpu_map__cpu(map, i), NULL);
TEST_ASSERT_VAL("Die map - Socket ID doesn't match",
session->header.env.cpu[map->map[i]].socket_id == id.socket);
return id;
}
-struct aggr_cpu_id cpu_map__get_die(struct perf_cpu_map *map, int idx,
- void *data)
-{
- if (idx < 0 || idx > map->nr)
- return cpu_map__empty_aggr_cpu_id();
-
- return cpu_map__get_die_aggr_by_cpu(map->map[idx], data);
-}
-
int cpu_map__get_core_id(int cpu)
{
int value, ret = cpu__get_topology_int(cpu, "core_id", &value);
struct aggr_cpu_id cpu_map__get_socket_aggr_by_cpu(int cpu, void *data);
int cpu_map__get_die_id(int cpu);
struct aggr_cpu_id cpu_map__get_die_aggr_by_cpu(int cpu, void *data);
-struct aggr_cpu_id cpu_map__get_die(struct perf_cpu_map *map, int idx, void *data);
int cpu_map__get_core_id(int cpu);
struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data);
struct aggr_cpu_id cpu_map__get_core(struct perf_cpu_map *map, int idx, void *data);
* On multi-die system, die_id > 0. On no-die system, die_id = 0.
* We use hashmap(socket, die) to check the used socket+die pair.
*/
- d = cpu_map__get_die(cpus, cpu, NULL).die;
+ d = cpu_map__get_die_id(cpu);
if (d < 0)
return -1;