From 6b1c130f41d0b439c319ac7577423a04de4daeee Mon Sep 17 00:00:00 2001 From: chuguangqing Date: Tue, 31 Oct 2023 14:55:54 +0800 Subject: [PATCH] anolis: perf: fix perf session test fail ANBZ: #7084 This fixes the "Session topology" self test. After this fix the output contains the correct socket and die IDs and no longer prints a warning about the size of the socket ID: ./perf test session Signed-off-by: chuguangqing --- tools/perf/util/cpumap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index ea8d28b0d16b..42b377307064 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -194,10 +194,7 @@ int cpu_map__get_die(struct perf_cpu_map *map, int idx, void *data) if (WARN_ONCE(die_id >> 8, "The die id number is too big.\n")) return -1; - if (WARN_ONCE(s >> 8, "The socket id number is too big.\n")) - return -1; - - return (s << 8) | (die_id & 0xff); + return (die_id & 0xff); } int cpu_map__get_core_id(int cpu) -- Gitee