perf sched: Use cached rbtrees
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 6 Dec 2018 19:18:19 +0000 (11:18 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 25 Jan 2019 14:12:10 +0000 (15:12 +0100)
commitcb4c13a5137766c3666ae106e1a5549316992379
tree48ed38c635c2d4762b589d20ab744b246c724e73
parent2eb3d6894ae3b9cc8a94c91458a041c45773f23d
perf sched: 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 heavily required for perf-sched.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20181206191819.30182-8-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c