summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2020-11-26 16:13:24 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-12-24 10:04:52 -0300
commitfcd83a35dd93b89d3f48cfcd33c31b112cc96180 (patch)
treef500e86bccadf4822b56ff5a65565c6550d94528 /tools/perf/tests
parentff5232956e074994a66656f709c3ad1ee3d8a550 (diff)
downloadlinux-stable-fcd83a35dd93b89d3f48cfcd33c31b112cc96180.tar.gz
linux-stable-fcd83a35dd93b89d3f48cfcd33c31b112cc96180.tar.bz2
linux-stable-fcd83a35dd93b89d3f48cfcd33c31b112cc96180.zip
perf stat aggregation: Add separate node member
Add node 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-9-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/topology.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index 7a7d16b3950a..ee272d45a445 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -119,6 +119,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
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));
+ TEST_ASSERT_VAL("Core map - Node ID is set", id.node == -1);
}
// Test that die ID contains socket and die
@@ -131,6 +132,8 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
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));
+
+ TEST_ASSERT_VAL("Die map - Node ID is set", id.node == -1);
}
// Test that socket ID contains only socket
@@ -138,13 +141,16 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
id = cpu_map__get_socket(map, i, NULL);
TEST_ASSERT_VAL("Socket map - Socket ID doesn't match",
session->header.env.cpu[map->map[i]].socket_id == id.id);
+
+ TEST_ASSERT_VAL("Socket map - Node ID is set", id.node == -1);
}
// Test that node ID contains only node
for (i = 0; i < map->nr; i++) {
id = cpu_map__get_node(map, i, NULL);
TEST_ASSERT_VAL("Node map - Node ID doesn't match",
- cpu__get_node(map->map[i]) == id.id);
+ cpu__get_node(map->map[i]) == id.node);
+ TEST_ASSERT_VAL("Node map - ID is set", id.id == -1);
}
perf_session__delete(session);