diff options
| author | Davidlohr Bueso <[email protected]> | 2018-12-06 19:18:17 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-01-25 14:12:10 +0000 |
| commit | 7137ff50b68a48bc28270c91b1c313259ab0c1c4 (patch) | |
| tree | 9af6b7fc0ae471e61d9a9d177f1f12d33e790d2b /tools/perf/builtin-annotate.c | |
| parent | perf util: Use cached rbtree for rblists (diff) | |
| download | kernel-7137ff50b68a48bc28270c91b1c313259ab0c1c4.tar.gz kernel-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 <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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); |
