[PATCH v2 1/4] perf build: Don't check difference of perf and libbpf hashmap
From: Ian Rogers
Date: Sat Mar 21 2026 - 20:59:22 EST
The hashmap code as-is violates the C specification meaning
-fno-strict-aliasing is required or fixes sent in:
https://lore.kernel.org/lkml/20260321024446.692008-1-irogers@xxxxxxxxxx/
We're looking to not build perf with -fno-strict-aliasing:
https://lore.kernel.org/lkml/20260320224248.536449-1-irogers@xxxxxxxxxx/
There is also the continual problem with hashmap using errptrs rather
than errno introducing subtle bugs as shown in commits,
d05073adda0f perf trace: Avoid an ERR_PTR in syscall_stats
96f202eab813 perf trace: Fix IS_ERR() vs NULL check bug
9f3c16a430e8 perf expr: Fix return value of ids__new()
but there are additional fixes on the mailing list.
https://lore.kernel.org/lkml/20250805063209.3678359-1-linmq006@xxxxxxxxx/
Let's allow the perf version of hashmap diverge from libbpf's so that
we can fix its issues.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/check-headers.sh | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index da3aca87457f..36b91cf1ccce 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -215,10 +215,6 @@ do
beauty_check "$i" -B
done
-# check duplicated library files
-check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h
-check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
-
# Files with larger differences
check_ignore_some_hunks lib/list_sort.c
--
2.53.0.959.g497ff81fa9-goog