aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hashmap.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-10-19 12:26:45 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-11-03 08:26:55 -0300
commite555b4b8d7b2844a9e48e06a7c3e4f9e44af847f (patch)
tree75596db3b51beb90d3be43de5a53ec029590839e /tools/perf/util/hashmap.c
parentperf tools: Remove LTO compiler options when building perl support (diff)
downloadlinux-dev-e555b4b8d7b2844a9e48e06a7c3e4f9e44af847f.tar.xz
linux-dev-e555b4b8d7b2844a9e48e06a7c3e4f9e44af847f.zip
perf tools: Update copy of libbpf's hashmap.c
To pick the changes in: 85367030a6c7ef33 ("libbpf: Centralize poisoning and poison reallocarray()") 7d9c71e10baa3496 ("libbpf: Extract generic string hashing function for reuse") That don't entail any changes in tools/perf. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h' diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h Not a kernel ABI, its just that this uses the mechanism in place for checking kernel ABI files drift. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrii Nakryiko <andriin@fb.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hashmap.c')
-rw-r--r--tools/perf/util/hashmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/hashmap.c b/tools/perf/util/hashmap.c
index a405dad068f5..3c20b126d60d 100644
--- a/tools/perf/util/hashmap.c
+++ b/tools/perf/util/hashmap.c
@@ -15,6 +15,9 @@
/* make sure libbpf doesn't use kernel-only integer typedefs */
#pragma GCC poison u8 u16 u32 u64 s8 s16 s32 s64
+/* prevent accidental re-addition of reallocarray() */
+#pragma GCC poison reallocarray
+
/* start with 4 buckets */
#define HASHMAP_MIN_CAP_BITS 2