summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/topology.c
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2020-11-26 16:13:26 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-12-24 10:05:19 -0300
commitba2ee166d92b201078cb941956547ab9828989d3 (patch)
tree2d25f8e99b240123e608c8f145a57cbee562d317 /tools/perf/tests/topology.c
parent1a270cb6b3cc18663f7fd165aa691c48d68739f2 (diff)
downloadlinux-ba2ee166d92b201078cb941956547ab9828989d3.tar.bz2
perf stat aggregation: Add separate die member
Add die as a separate member so that it doesn't have to be packed into the int value. Signed-off-by: James Clark <james.clark@arm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Tested-by: John Garry <john.garry@huawei.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20201126141328.6509-11-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/topology.c')
-rw-r--r--tools/perf/tests/topology.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index 777dd8291bcc..e3f822890a84 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -117,7 +117,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
session->header.env.cpu[map->map[i]].socket_id == id.socket);
TEST_ASSERT_VAL("Core map - Die ID doesn't match",
- session->header.env.cpu[map->map[i]].die_id == cpu_map__id_to_die(id.id));
+ session->header.env.cpu[map->map[i]].die_id == id.die);
TEST_ASSERT_VAL("Core map - Node ID is set", id.node == -1);
}
@@ -128,10 +128,10 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
session->header.env.cpu[map->map[i]].socket_id == id.socket);
TEST_ASSERT_VAL("Die map - Die ID doesn't match",
- session->header.env.cpu[map->map[i]].die_id ==
- cpu_map__id_to_die(id.id << 16));
+ session->header.env.cpu[map->map[i]].die_id == id.die);
TEST_ASSERT_VAL("Die map - Node ID is set", id.node == -1);
+ TEST_ASSERT_VAL("Die map - ID is set", id.id == -1);
}
// Test that socket ID contains only socket
@@ -141,6 +141,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
session->header.env.cpu[map->map[i]].socket_id == id.socket);
TEST_ASSERT_VAL("Socket map - Node ID is set", id.node == -1);
+ TEST_ASSERT_VAL("Socket map - Die ID is set", id.die == -1);
TEST_ASSERT_VAL("Socket map - ID is set", id.id == -1);
}
@@ -151,6 +152,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
cpu__get_node(map->map[i]) == id.node);
TEST_ASSERT_VAL("Node map - ID is set", id.id == -1);
TEST_ASSERT_VAL("Node map - Socket is set", id.socket == -1);
+ TEST_ASSERT_VAL("Node map - Die ID is set", id.die == -1);
}
perf_session__delete(session);