1 #ifndef __PERF_CALLCHAIN_H
2 #define __PERF_CALLCHAIN_H
9 struct callchain_node {
10 struct callchain_node *parent;
11 struct list_head brothers;
12 struct list_head children;
14 struct rb_node rb_node;
19 struct callchain_list {
21 struct list_head list;
24 static inline void callchain_init(struct callchain_node *node)
26 INIT_LIST_HEAD(&node->brothers);
27 INIT_LIST_HEAD(&node->children);
28 INIT_LIST_HEAD(&node->val);
31 void append_chain(struct callchain_node *root, struct ip_callchain *chain);
32 void sort_chain_to_rbtree(struct rb_root *rb_root, struct callchain_node *node);