aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/stat.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-08-23 22:06:04 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-04 08:55:19 -0300
commitbdf4572555652074272d7dd1c694674efe60bea6 (patch)
treebe58dc50a0aad422f4e32c7f8d0052f24211d26d /tools/perf/util/stat.c
parentperf metrics: Use 'unsigned int' instead of just 'unsigned'. (diff)
downloadlinux-dev-bdf4572555652074272d7dd1c694674efe60bea6.tar.xz
linux-dev-bdf4572555652074272d7dd1c694674efe60bea6.zip
perf hashmap: Tidy hashmap dependency
When libbpf is present the build uses definitions in libbpf hashmap.c, however, libbpf's hashmap.h wasn't being used. Switch to using the correct hashmap.h dependent on the define HAVE_LIBBPF_SUPPORT. This was the original intent in: https://lore.kernel.org/lkml/20200515221732.44078-8-irogers@google.com/ Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20220824050604.352156-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat.c')
-rw-r--r--tools/perf/util/stat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 0882b4754fcf..ce5e9e372fc4 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -14,7 +14,11 @@
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
-#include "hashmap.h"
+#ifdef HAVE_LIBBPF_SUPPORT
+#include <bpf/hashmap.h>
+#else
+#include "util/hashmap.h"
+#endif
#include <linux/zalloc.h>
void update_stats(struct stats *stats, u64 val)