diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-12-16 09:53:53 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-12-16 09:53:53 -0300 |
| commit | 1a931707ad4a46e79d4ecfee56d8f6e8cc8d4f28 (patch) | |
| tree | c3ed4dafca580360da63eef576b35eb67eb2e5a2 /tools/perf/util/bpf-loader.c | |
| parent | perf tools: Use "grep -E" instead of "egrep" (diff) | |
| parent | Merge tag 'exfat-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
| download | linux-1a931707ad4a46e79d4ecfee56d8f6e8cc8d4f28.tar.gz linux-1a931707ad4a46e79d4ecfee56d8f6e8cc8d4f28.zip | |
Merge remote-tracking branch 'torvalds/master' into perf/core
To resolve a trivial merge conflict with c302378bc157f6a7 ("libbpf:
Hashmap interface update to allow both long and void* keys/values"),
where a function present upstream was removed in the perf tools
development tree.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/bpf-loader.c')
| -rw-r--r-- | tools/perf/util/bpf-loader.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index b3c8174360bf..6e9b06cf06ee 100644 --- a/tools/perf/util/bpf-loader.c +++ b/tools/perf/util/bpf-loader.c @@ -314,7 +314,7 @@ static void bpf_program_hash_free(void) return; hashmap__for_each_entry(bpf_program_hash, cur, bkt) - clear_prog_priv(cur->key, cur->value); + clear_prog_priv(cur->pkey, cur->pvalue); hashmap__free(bpf_program_hash); bpf_program_hash = NULL; @@ -335,13 +335,12 @@ void bpf__clear(void) bpf_map_hash_free(); } -static size_t ptr_hash(const void *__key, void *ctx __maybe_unused) +static size_t ptr_hash(const long __key, void *ctx __maybe_unused) { - return (size_t) __key; + return __key; } -static bool ptr_equal(const void *key1, const void *key2, - void *ctx __maybe_unused) +static bool ptr_equal(long key1, long key2, void *ctx __maybe_unused) { return key1 == key2; } @@ -1181,7 +1180,7 @@ static void bpf_map_hash_free(void) return; hashmap__for_each_entry(bpf_map_hash, cur, bkt) - bpf_map_priv__clear(cur->key, cur->value); + bpf_map_priv__clear(cur->pkey, cur->pvalue); hashmap__free(bpf_map_hash); bpf_map_hash = NULL; |
