]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Add template for generating rbtree resort class
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 5 May 2016 14:44:28 +0000 (11:44 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 6 May 2016 00:03:55 +0000 (21:03 -0300)
commitfa5642f481ec56d0df2440b494028eb6c7cf6f73
treebe501268cc195f87c01f3b250831bdaaff86f9f6
parent5776eeee167d7413700421f11ff69227cf3ff159
perf tools: Add template for generating rbtree resort class

Sometimes we want to sort an existing rbtree by a different key,
introduce a template for that, that needs only to be provided the
rbtree root and the number of entries in it.

To do that a new rbtree will be created with extra space for each entry,
where possibly pre-calculated keys will be stored to be used in the
resort process and also later, when using the newly sorted rbtree.

Please check the following two changesets to see it in use for resorting
stats for threads and its syscalls in 'perf trace --summary'.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-9l6e1q34lmf3wwdeewstyakg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/rb_resort.h [new file with mode: 0644]