diff options
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r-- | tools/perf/util/callchain.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 2b585bc308cf..4f7f989876ec 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h | |||
@@ -21,11 +21,11 @@ enum chain_order { | |||
21 | 21 | ||
22 | struct callchain_node { | 22 | struct callchain_node { |
23 | struct callchain_node *parent; | 23 | struct callchain_node *parent; |
24 | struct list_head siblings; | ||
25 | struct list_head children; | ||
26 | struct list_head val; | 24 | struct list_head val; |
27 | struct rb_node rb_node; /* to sort nodes in an rbtree */ | 25 | struct rb_node rb_node_in; /* to insert nodes in an rbtree */ |
28 | struct rb_root rb_root; /* sorted tree of children */ | 26 | struct rb_node rb_node; /* to sort nodes in an output tree */ |
27 | struct rb_root rb_root_in; /* input tree of children */ | ||
28 | struct rb_root rb_root; /* sorted output tree of children */ | ||
29 | unsigned int val_nr; | 29 | unsigned int val_nr; |
30 | u64 hit; | 30 | u64 hit; |
31 | u64 children_hit; | 31 | u64 children_hit; |
@@ -86,13 +86,12 @@ extern __thread struct callchain_cursor callchain_cursor; | |||
86 | 86 | ||
87 | static inline void callchain_init(struct callchain_root *root) | 87 | static inline void callchain_init(struct callchain_root *root) |
88 | { | 88 | { |
89 | INIT_LIST_HEAD(&root->node.siblings); | ||
90 | INIT_LIST_HEAD(&root->node.children); | ||
91 | INIT_LIST_HEAD(&root->node.val); | 89 | INIT_LIST_HEAD(&root->node.val); |
92 | 90 | ||
93 | root->node.parent = NULL; | 91 | root->node.parent = NULL; |
94 | root->node.hit = 0; | 92 | root->node.hit = 0; |
95 | root->node.children_hit = 0; | 93 | root->node.children_hit = 0; |
94 | root->node.rb_root_in = RB_ROOT; | ||
96 | root->max_depth = 0; | 95 | root->max_depth = 0; |
97 | } | 96 | } |
98 | 97 | ||
@@ -147,6 +146,9 @@ static inline void callchain_cursor_advance(struct callchain_cursor *cursor) | |||
147 | 146 | ||
148 | struct option; | 147 | struct option; |
149 | 148 | ||
149 | int record_parse_callchain(const char *arg, struct perf_record_opts *opts); | ||
150 | int record_parse_callchain_opt(const struct option *opt, const char *arg, int unset); | 150 | int record_parse_callchain_opt(const struct option *opt, const char *arg, int unset); |
151 | int record_callchain_opt(const struct option *opt, const char *arg, int unset); | ||
152 | |||
151 | extern const char record_callchain_help[]; | 153 | extern const char record_callchain_help[]; |
152 | #endif /* __PERF_CALLCHAIN_H */ | 154 | #endif /* __PERF_CALLCHAIN_H */ |