perf callchain: Use cached rbtrees
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 6 Dec 2018 19:18:15 +0000 (11:18 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 25 Jan 2019 14:12:09 +0000 (15:12 +0100)
commit55ecd6310f9fe48cf7e435be408862da1e0e6baa
treef4f4d1c79b4404d488f1e2a1c22660862a1561cc
parentf3acb3a8a2081344801974ac5ec8e1b0d6f0ef36
perf callchain: 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), which is
something required for nearly every in/srcline callchain node deletion
(in/srcline__tree_delete()).

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-4-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dso.c
tools/perf/util/dso.h
tools/perf/util/srcline.c
tools/perf/util/srcline.h