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/stat.c | |
parent | 818448e9cf92e5c6b3c10320372eefcbe4174e4f (diff) | |
parent | 84e57d292203a45c96dbcb2e6be9dd80961d981a (diff) | |
download | lwn-1a931707ad4a46e79d4ecfee56d8f6e8cc8d4f28.tar.gz lwn-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/stat.c')
-rw-r--r-- | tools/perf/util/stat.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 673f017a211f..534d36d26fc3 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -314,15 +314,14 @@ void evlist__copy_prev_raw_counts(struct evlist *evlist) evsel__copy_prev_raw_counts(evsel); } -static size_t pkg_id_hash(const void *__key, void *ctx __maybe_unused) +static size_t pkg_id_hash(long __key, void *ctx __maybe_unused) { uint64_t *key = (uint64_t *) __key; return *key & 0xffffffff; } -static bool pkg_id_equal(const void *__key1, const void *__key2, - void *ctx __maybe_unused) +static bool pkg_id_equal(long __key1, long __key2, void *ctx __maybe_unused) { uint64_t *key1 = (uint64_t *) __key1; uint64_t *key2 = (uint64_t *) __key2; @@ -383,11 +382,11 @@ static int check_per_pkg(struct evsel *counter, struct perf_counts_values *vals, return -ENOMEM; *key = (uint64_t)d << 32 | s; - if (hashmap__find(mask, (void *)key, NULL)) { + if (hashmap__find(mask, key, NULL)) { *skip = true; free(key); } else - ret = hashmap__add(mask, (void *)key, (void *)1); + ret = hashmap__add(mask, key, 1); return ret; } |