diff options
author | Ian Rogers <irogers@google.com> | 2022-08-24 08:06:04 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-10-04 14:55:19 +0300 |
commit | bdf4572555652074272d7dd1c694674efe60bea6 (patch) | |
tree | be58dc50a0aad422f4e32c7f8d0052f24211d26d /tools/perf/util/expr.h | |
parent | 84f879c5331873a7b4036ff2f319d0f2fcf4179b (diff) | |
download | linux-bdf4572555652074272d7dd1c694674efe60bea6.tar.xz |
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/expr.h')
-rw-r--r-- | tools/perf/util/expr.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h index bd2116983bbb..0403a92d9dcc 100644 --- a/tools/perf/util/expr.h +++ b/tools/perf/util/expr.h @@ -2,14 +2,11 @@ #ifndef PARSE_CTX_H #define PARSE_CTX_H 1 -// There are fixes that need to land upstream before we can use libbpf's headers, -// for now use our copy unconditionally, since the data structures at this point -// are exactly the same, no problem. -//#ifdef HAVE_LIBBPF_SUPPORT -//#include <bpf/hashmap.h> -//#else +#ifdef HAVE_LIBBPF_SUPPORT +#include <bpf/hashmap.h> +#else #include "util/hashmap.h" -//#endif +#endif struct metric_ref; |