perf hists: Resort hist entries with hierarchy
authorNamhyung Kim <namhyung@kernel.org>
Wed, 24 Feb 2016 15:13:35 +0000 (00:13 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 24 Feb 2016 19:54:09 +0000 (16:54 -0300)
commit1a3906a7e6b9cbfaf2a3d00c310aed8af8e10d92
tree0ac85c84b36f065552013f89eaa45414a83a3f4d
parentaef810ec4e6b638facb6c81803c019906f34f014
perf hists: Resort hist entries with hierarchy

For hierarchical output, each entry must be sorted in their rbtree
(hroot) properly.  Add hists__hierarchy_output_resort() to do the job.
Note that those hierarchy entries share the period counts, it'd be
important to update the hists->stats only once (for leaves).

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1456326830-30456-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/hist.c