perf threads: Switch from rbtree to hashmap
authorIan Rogers <irogers@google.com>
Fri, 1 Mar 2024 05:36:44 +0000 (21:36 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Mon, 4 Mar 2024 06:52:04 +0000 (22:52 -0800)
commit412a2ff473ac01b195eb38c0853ce065b524b2e2
tree6898594528c68f269b9f98715924371df334e0a1
parent93bb5b0d9394cbf49b76823c48ed8b815a5d899c
perf threads: Switch from rbtree to hashmap

The rbtree provides a sorting on entries but this is unused. Switch to
using hashmap for O(1) rather than O(log n) find/insert/remove
complexity.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240301053646.1449657-7-irogers@google.com
tools/perf/util/threads.c
tools/perf/util/threads.h