lkml.org 
[lkml]   [2013]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] perf callchain: Convert children list to rbtree
On Tue, Sep 10, 2013 at 05:24:16PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>

SNIP

> index 2b585bc308cf..1b22b6269213 100644
> --- a/tools/perf/util/callchain.h
> +++ b/tools/perf/util/callchain.h
> @@ -21,10 +21,9 @@ enum chain_order {
>
> struct callchain_node {
> struct callchain_node *parent;
> - struct list_head siblings;
> - struct list_head children;
> struct list_head val;
> struct rb_node rb_node; /* to sort nodes in an rbtree */
> + struct rb_root rb_root_in; /* sorted tree of children */
> struct rb_root rb_root; /* sorted tree of children */
> unsigned int val_nr;
> u64 hit;
> @@ -86,8 +85,6 @@ extern __thread struct callchain_cursor callchain_cursor;
>
> static inline void callchain_init(struct callchain_root *root)
> {
> - INIT_LIST_HEAD(&root->node.siblings);
> - INIT_LIST_HEAD(&root->node.children);
> INIT_LIST_HEAD(&root->node.val);

don't we miss rb_root_in init here, like:

root->node.rb_root_in = RB_ROOT;

jirka


\
 
 \ /
  Last update: 2013-09-22 13:41    [W:0.129 / U:4.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site