diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2018-12-06 20:18:17 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-01-25 15:12:10 +0100 |
commit | 7137ff50b68a48bc28270c91b1c313259ab0c1c4 (patch) | |
tree | 9af6b7fc0ae471e61d9a9d177f1f12d33e790d2b /tools/perf/builtin-annotate.c | |
parent | perf util: Use cached rbtree for rblists (diff) | |
download | linux-7137ff50b68a48bc28270c91b1c313259ab0c1c4.tar.xz linux-7137ff50b68a48bc28270c91b1c313259ab0c1c4.zip |
perf symbols: Use cached rbtrees
At the cost of an extra pointer, we can avoid the O(logN) cost of
finding the first element in the tree (smallest node).
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20181206191819.30182-6-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 93d679eaf1f4..cc3da5564300 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -227,7 +227,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel, * the DSO? */ if (al->sym != NULL) { - rb_erase(&al->sym->rb_node, + rb_erase_cached(&al->sym->rb_node, &al->map->dso->symbols); symbol__delete(al->sym); dso__reset_find_symbol_cache(al->map->dso); |