| /tools/include/linux/ |
| D | rbtree.h | 23 struct rb_node { struct 25 struct rb_node *rb_right; argument 26 struct rb_node *rb_left; argument 31 struct rb_node *rb_node; member 34 #define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3)) 39 #define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL) 48 extern void rb_insert_color(struct rb_node *, struct rb_root *); 49 extern void rb_erase(struct rb_node *, struct rb_root *); 53 extern struct rb_node *rb_next(const struct rb_node *); 54 extern struct rb_node *rb_prev(const struct rb_node *); [all …]
|
| D | rbtree_augmented.h | 30 void (*propagate)(struct rb_node *node, struct rb_node *stop); 31 void (*copy)(struct rb_node *old, struct rb_node *new); 32 void (*rotate)(struct rb_node *old, struct rb_node *new); 35 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 36 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); 49 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() 56 rb_insert_augmented_cached(struct rb_node *node, in rb_insert_augmented_cached() 79 RBNAME ## _propagate(struct rb_node *rb, struct rb_node *stop) \ 89 RBNAME ## _copy(struct rb_node *rb_old, struct rb_node *rb_new) \ 96 RBNAME ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \ [all …]
|
| D | interval_tree_generic.h | 41 struct rb_node **link = &root->rb_root.rb_node, *rb_parent = NULL; \ 124 if (!root->rb_root.rb_node) \ 140 node = rb_entry(root->rb_root.rb_node, ITSTRUCT, ITRB); \ 154 struct rb_node *rb = node->ITRB.rb_right, *prev; \
|
| /tools/perf/util/ |
| D | intlist.c | 13 static struct rb_node *intlist__node_new(struct rblist *rblist __maybe_unused, in intlist__node_new() 17 struct rb_node *rc = NULL; in intlist__node_new() 23 rc = &node->rb_node; in intlist__node_new() 35 struct rb_node *rb_node) in intlist__node_delete() argument 37 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_delete() 42 static int intlist__node_cmp(struct rb_node *rb_node, const void *entry) in intlist__node_cmp() argument 45 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_cmp() 62 rblist__remove_node(&ilist->rblist, &node->rb_node); in intlist__remove() 69 struct rb_node *rb_node; in __intlist__findnew() local 75 rb_node = rblist__findnew(&ilist->rblist, (void *)i); in __intlist__findnew() [all …]
|
| D | rblist.c | 15 struct rb_node **p = &rblist->entries.rb_root.rb_node; in rblist__add_node() 16 struct rb_node *parent = NULL, *new_node; in rblist__add_node() 46 void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node) in rblist__remove_node() argument 48 rb_erase_cached(rb_node, &rblist->entries); in rblist__remove_node() 50 rblist->node_delete(rblist, rb_node); in rblist__remove_node() 53 static struct rb_node *__rblist__findnew(struct rblist *rblist, in __rblist__findnew() 57 struct rb_node **p = &rblist->entries.rb_root.rb_node; in __rblist__findnew() 58 struct rb_node *parent = NULL, *new_node = NULL; in __rblist__findnew() 90 struct rb_node *rblist__find(struct rblist *rblist, const void *entry) in rblist__find() 95 struct rb_node *rblist__findnew(struct rblist *rblist, const void *entry) in rblist__findnew() [all …]
|
| D | strlist.c | 15 struct rb_node *strlist__node_new(struct rblist *rblist, const void *entry) in strlist__node_new() 18 struct rb_node *rc = NULL; in strlist__node_new() 29 rc = &snode->rb_node; in strlist__node_new() 47 void strlist__node_delete(struct rblist *rblist, struct rb_node *rb_node) in strlist__node_delete() argument 50 struct str_node *snode = container_of(rb_node, struct str_node, rb_node); in strlist__node_delete() 55 static int strlist__node_cmp(struct rb_node *rb_node, const void *entry) in strlist__node_cmp() argument 58 struct str_node *snode = container_of(rb_node, struct str_node, rb_node); in strlist__node_cmp() 97 rblist__remove_node(&slist->rblist, &snode->rb_node); in strlist__remove() 103 struct rb_node *rb_node = rblist__find(&slist->rblist, entry); in strlist__find() local 105 if (rb_node) in strlist__find() [all …]
|
| D | rblist.h | 26 int (*node_cmp)(struct rb_node *rbn, const void *entry); 27 struct rb_node *(*node_new)(struct rblist *rlist, const void *new_entry); 28 void (*node_delete)(struct rblist *rblist, struct rb_node *rb_node); 35 void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node); 36 struct rb_node *rblist__find(struct rblist *rblist, const void *entry); 37 struct rb_node *rblist__findnew(struct rblist *rblist, const void *entry); 38 struct rb_node *rblist__entry(const struct rblist *rblist, unsigned int idx);
|
| D | rb_resort.h | 57 struct rb_node rb_node; \ 60 static void __name##_sorted__init_entry(struct rb_node *nd, \ 63 static int __name##_sorted__cmp(struct rb_node *nda, struct rb_node *ndb) \ 66 a = rb_entry(nda, struct __name##_sorted_entry, rb_node); \ 67 b = rb_entry(ndb, struct __name##_sorted_entry, rb_node); \ 77 struct rb_node *sorted_nd) \ 79 struct rb_node **p = &sorted->entries.rb_node, *parent = NULL; \ 94 struct rb_node *nd; \ 99 __name##_sorted__insert(sorted, &snd->rb_node); \ 120 static void __name##_sorted__init_entry(struct rb_node *nd, \ [all …]
|
| D | mem2node.c | 12 struct rb_node rb_node; member 20 struct rb_node **p = &root->rb_node; in phys_entry__insert() 21 struct rb_node *parent = NULL; in phys_entry__insert() 26 e = rb_entry(parent, struct phys_entry, rb_node); in phys_entry__insert() 34 rb_link_node(&entry->rb_node, parent, p); in phys_entry__insert() 35 rb_insert_color(&entry->rb_node, root); in phys_entry__insert() 44 RB_CLEAR_NODE(&entry->rb_node); in phys_entry__init() 121 struct rb_node **p, *parent = NULL; in mem2node__node() 124 p = &map->root.rb_node; in mem2node__node() 127 entry = rb_entry(parent, struct phys_entry, rb_node); in mem2node__node()
|
| D | intlist.h | 11 struct rb_node rb_node; member 48 struct rb_node *rn = rb_first_cached(&ilist->rblist.entries); in intlist__first() 49 return rn ? rb_entry(rn, struct int_node, rb_node) : NULL; in intlist__first() 53 struct rb_node *rn; in intlist__next() 56 rn = rb_next(&in->rb_node); in intlist__next() 57 return rn ? rb_entry(rn, struct int_node, rb_node) : NULL; in intlist__next()
|
| D | strlist.h | 11 struct rb_node rb_node; member 60 struct rb_node *rn = rb_first_cached(&slist->rblist.entries); in strlist__first() 61 return rn ? rb_entry(rn, struct str_node, rb_node) : NULL; in strlist__first() 65 struct rb_node *rn; in strlist__next() 68 rn = rb_next(&sn->rb_node); in strlist__next() 69 return rn ? rb_entry(rn, struct str_node, rb_node) : NULL; in strlist__next()
|
| D | bpf-event.h | 22 struct rb_node rb_node; member 26 struct rb_node rb_node; member
|
| D | call-path.c | 22 RB_CLEAR_NODE(&cp->rb_node); in call_path__init() 81 struct rb_node **p; in call_path__findnew() 82 struct rb_node *node_parent = NULL; in call_path__findnew() 92 p = &parent->children.rb_node; in call_path__findnew() 95 cp = rb_entry(node_parent, struct call_path, rb_node); in call_path__findnew() 110 rb_link_node(&cp->rb_node, node_parent, p); in call_path__findnew() 111 rb_insert_color(&cp->rb_node, &parent->children); in call_path__findnew()
|
| D | block-range.c | 15 struct rb_node *rb; in block_range__debug() 31 struct rb_node **p = &block_ranges.root.rb_node; in block_range__find() 32 struct rb_node *parent = NULL; in block_range__find() 50 static inline void rb_link_left_of_node(struct rb_node *left, struct rb_node *node) in rb_link_left_of_node() 52 struct rb_node **p = &node->rb_left; in rb_link_left_of_node() 60 static inline void rb_link_right_of_node(struct rb_node *right, struct rb_node *node) in rb_link_right_of_node() 62 struct rb_node **p = &node->rb_right; in rb_link_right_of_node() 79 struct rb_node **p = &block_ranges.root.rb_node; in block_range__create() 80 struct rb_node *n, *parent = NULL; in block_range__create()
|
| D | env.c | 41 struct rb_node *parent = NULL; in __perf_env__insert_bpf_prog_info() 42 struct rb_node **p; in __perf_env__insert_bpf_prog_info() 44 p = &env->bpf_progs.infos.rb_node; in __perf_env__insert_bpf_prog_info() 48 node = rb_entry(parent, struct bpf_prog_info_node, rb_node); in __perf_env__insert_bpf_prog_info() 59 rb_link_node(&info_node->rb_node, parent, p); in __perf_env__insert_bpf_prog_info() 60 rb_insert_color(&info_node->rb_node, &env->bpf_progs.infos); in __perf_env__insert_bpf_prog_info() 69 struct rb_node *n; in perf_env__find_bpf_prog_info() 72 n = env->bpf_progs.infos.rb_node; in perf_env__find_bpf_prog_info() 75 node = rb_entry(n, struct bpf_prog_info_node, rb_node); in perf_env__find_bpf_prog_info() 102 struct rb_node *parent = NULL; in __perf_env__insert_btf() [all …]
|
| D | hist.c | 256 struct rb_node *next = rb_first_cached(&hists->entries); in hists__output_recalc_col_len() 263 n = rb_entry(next, struct hist_entry, rb_node); in hists__output_recalc_col_len() 266 next = rb_next(&n->rb_node); in hists__output_recalc_col_len() 352 struct rb_node *node = rb_first_cached(&he->hroot_out); in hists__decay_entry() 354 child = rb_entry(node, struct hist_entry, rb_node); in hists__decay_entry() 382 rb_erase_cached(&he->rb_node, root_out); in hists__delete_entry() 393 struct rb_node *next = rb_first_cached(&hists->entries); in hists__decay_entries() 397 n = rb_entry(next, struct hist_entry, rb_node); in hists__decay_entries() 398 next = rb_next(&n->rb_node); in hists__decay_entries() 409 struct rb_node *next = rb_first_cached(&hists->entries); in hists__delete_entries() [all …]
|
| D | srcline.c | 974 struct rb_node rb_node; member 979 struct rb_node **p = &tree->rb_root.rb_node; in srcline__tree_insert() 980 struct rb_node *parent = NULL; in srcline__tree_insert() 995 i = rb_entry(parent, struct srcline_node, rb_node); in srcline__tree_insert() 1003 rb_link_node(&node->rb_node, parent, p); in srcline__tree_insert() 1004 rb_insert_color_cached(&node->rb_node, tree, leftmost); in srcline__tree_insert() 1009 struct rb_node *n = tree->rb_root.rb_node; in srcline__tree_find() 1013 rb_node); in srcline__tree_find() 1029 struct rb_node *next = rb_first_cached(tree); in srcline__tree_delete() 1032 pos = rb_entry(next, struct srcline_node, rb_node); in srcline__tree_delete() [all …]
|
| D | symbol.c | 194 struct rb_node *nd; in symbols__fixup_duplicate() 203 curr = rb_entry(nd, struct symbol, rb_node); in symbols__fixup_duplicate() 205 nd = rb_next(&curr->rb_node); in symbols__fixup_duplicate() 209 next = rb_entry(nd, struct symbol, rb_node); in symbols__fixup_duplicate() 216 rb_erase_cached(&next->rb_node, symbols); in symbols__fixup_duplicate() 222 nd = rb_next(&curr->rb_node); in symbols__fixup_duplicate() 223 rb_erase_cached(&curr->rb_node, symbols); in symbols__fixup_duplicate() 232 struct rb_node *nd, *prevnd = rb_first_cached(symbols); in symbols__fixup_end() 238 curr = rb_entry(prevnd, struct symbol, rb_node); in symbols__fixup_end() 242 curr = rb_entry(nd, struct symbol, rb_node); in symbols__fixup_end() [all …]
|
| D | stream.c | 103 struct rb_node *rb_node = rb_first(root); in update_hot_callchain() local 106 while (rb_node) { in update_hot_callchain() 107 cnode = rb_entry(rb_node, struct callchain_node, rb_node); in update_hot_callchain() 109 rb_node = rb_next(rb_node); in update_hot_callchain() 115 struct rb_node *next = rb_first_cached(&hists->entries); in init_hot_callchain() 120 he = rb_entry(next, struct hist_entry, rb_node); in init_hot_callchain() 122 next = rb_next(&he->rb_node); in init_hot_callchain()
|
| /tools/lib/ |
| D | rbtree.c | 59 static inline void rb_set_black(struct rb_node *rb) in rb_set_black() 64 static inline struct rb_node *rb_red_parent(struct rb_node *red) in rb_red_parent() 66 return (struct rb_node *)red->__rb_parent_color; in rb_red_parent() 75 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() 78 struct rb_node *parent = rb_parent(old); in __rb_rotate_set_parents() 85 __rb_insert(struct rb_node *node, struct rb_root *root, in __rb_insert() 86 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() 88 struct rb_node *parent = rb_red_parent(node), *gparent, *tmp; in __rb_insert() 227 ____rb_erase_color(struct rb_node *parent, struct rb_root *root, in ____rb_erase_color() 228 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() [all …]
|
| /tools/perf/tests/ |
| D | hists_output.c | 100 struct rb_node *node; in del_hist_entries() 112 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 144 struct rb_node *node; in test1() 180 he = rb_entry(node, struct hist_entry, rb_node); in test1() 186 he = rb_entry(node, struct hist_entry, rb_node); in test1() 192 he = rb_entry(node, struct hist_entry, rb_node); in test1() 198 he = rb_entry(node, struct hist_entry, rb_node); in test1() 204 he = rb_entry(node, struct hist_entry, rb_node); in test1() 210 he = rb_entry(node, struct hist_entry, rb_node); in test1() 216 he = rb_entry(node, struct hist_entry, rb_node); in test1() [all …]
|
| /tools/perf/ui/browsers/ |
| D | map.c | 27 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in map_browser__write() 45 return ((void *)browser) - sizeof(struct rb_node) - sizeof(u32); in symbol__browser_index() 67 browser->b.top = &sym->rb_node; in map_browser__search() 116 struct rb_node *nd; in map__browse() 121 struct symbol *pos = rb_entry(nd, struct symbol, rb_node); in map__browse()
|
| /tools/perf/ui/stdio/ |
| D | hist.c | 113 struct rb_node *node, *next; in __callchain__fprintf_graph() 130 child = rb_entry(node, struct callchain_node, rb_node); in __callchain__fprintf_graph() 206 static bool need_percent_display(struct rb_node *node, u64 parent_samples) in need_percent_display() 213 cnode = rb_entry(node, struct callchain_node, rb_node); in need_percent_display() 225 struct rb_node *node; in callchain__fprintf_graph() 232 cnode = rb_entry(node, struct callchain_node, rb_node); in callchain__fprintf_graph() 311 struct rb_node *rb_node = rb_first(tree); in callchain__fprintf_flat() local 313 while (rb_node) { in callchain__fprintf_flat() 314 chain = rb_entry(rb_node, struct callchain_node, rb_node); in callchain__fprintf_flat() 324 rb_node = rb_next(rb_node); in callchain__fprintf_flat() [all …]
|
| /tools/bpf/resolve_btfids/ |
| D | main.c | 102 struct rb_node rb_node; member 179 struct rb_node *p = root->rb_node; in btf_id__find() 184 id = rb_entry(p, struct btf_id, rb_node); in btf_id__find() 199 struct rb_node **p = &root->rb_node; in btf_id__add() 200 struct rb_node *parent = NULL; in btf_id__add() 206 id = rb_entry(parent, struct btf_id, rb_node); in btf_id__add() 220 rb_link_node(&id->rb_node, parent, p); in btf_id__add() 221 rb_insert_color(&id->rb_node, root); in btf_id__add() 653 struct rb_node *next; in __symbols_patch() 658 id = rb_entry(next, struct btf_id, rb_node); in __symbols_patch() [all …]
|
| /tools/sched_ext/ |
| D | scx_flatcg.bpf.c | 102 struct bpf_rb_node rb_node; member 108 private(CGV_TREE) struct bpf_rb_root cgv_tree __contains(cgv_node, rb_node); 149 cgc_a = container_of(a, struct cgv_node, rb_node); in cgv_node_less() 150 cgc_b = container_of(b, struct cgv_node, rb_node); in cgv_node_less() 307 bpf_rbtree_add(&cgv_tree, &cgv_node->rb_node, cgv_node_less); in cgrp_enqueued() 612 struct bpf_rb_node *rb_node; in try_pick_next_cgroup() local 622 rb_node = bpf_rbtree_first(&cgv_tree); in try_pick_next_cgroup() 623 if (!rb_node) { in try_pick_next_cgroup() 630 rb_node = bpf_rbtree_remove(&cgv_tree, rb_node); in try_pick_next_cgroup() 633 if (!rb_node) { in try_pick_next_cgroup() [all …]
|