perf_counter tools: Add more warnings and fix/annotate them
[linux-2.6/verdex.git] / tools / perf / util / callchain.h
blob251d99ecd2255ccc20554c5343d9c2a0c96b2e4c
1 #ifndef __PERF_CALLCHAIN_H
2 #define __PERF_CALLCHAIN_H
4 #include "../perf.h"
5 #include "list.h"
6 #include "rbtree.h"
7 #include "symbol.h"
10 struct callchain_node {
11 struct callchain_node *parent;
12 struct list_head brothers;
13 struct list_head children;
14 struct list_head val;
15 struct rb_node rb_node;
16 unsigned int val_nr;
17 u64 hit;
20 struct callchain_list {
21 u64 ip;
22 struct symbol *sym;
23 struct list_head list;
26 static inline void callchain_init(struct callchain_node *node)
28 INIT_LIST_HEAD(&node->brothers);
29 INIT_LIST_HEAD(&node->children);
30 INIT_LIST_HEAD(&node->val);
33 void append_chain(struct callchain_node *root, struct ip_callchain *chain,
34 struct symbol **syms);
35 void sort_chain_to_rbtree(struct rb_root *rb_root, struct callchain_node *node);
36 #endif