| /tools/include/linux/ |
| A D | rbtree.h | 23 struct rb_node { struct 31 struct rb_node *rb_node; member 53 extern struct rb_node *rb_next(const struct rb_node *); 54 extern struct rb_node *rb_prev(const struct rb_node *); 60 extern struct rb_node *rb_next_postorder(const struct rb_node *); 181 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_cached() 209 struct rb_node **link = &tree->rb_node; in rb_add() 235 int (*cmp)(struct rb_node *, const struct rb_node *)) in rb_find_add() argument 237 struct rb_node **link = &tree->rb_node; in rb_find_add() 270 struct rb_node *node = tree->rb_node; in rb_find() [all …]
|
| A 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); 36 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); 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) \ 159 static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) in rb_set_parent() 171 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() 180 WRITE_ONCE(root->rb_node, new); in __rb_change_child() [all …]
|
| A 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/ |
| A D | intlist.c | 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() 69 struct rb_node *rb_node; in __intlist__findnew() local 79 if (rb_node) in __intlist__findnew() 80 node = container_of(rb_node, struct int_node, rb_node); in __intlist__findnew() 143 struct rb_node *rb_node; in intlist__entry() local 146 if (rb_node) in intlist__entry() [all …]
|
| A 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() 112 struct rb_node *pos, *next = rb_first_cached(&rblist->entries); in rblist__exit() [all …]
|
| A D | strlist.c | 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() 103 struct rb_node *rb_node = rblist__find(&slist->rblist, entry); in strlist__find() local 105 if (rb_node) in strlist__find() 106 snode = container_of(rb_node, struct str_node, rb_node); in strlist__find() 201 struct rb_node *rb_node; in strlist__entry() local 204 if (rb_node) in strlist__entry() [all …]
|
| A 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);
|
| A 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()
|
| A 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()
|
| A 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()
|
| A 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()
|
| A 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()
|
| A D | bpf-event.h | 29 struct rb_node rb_node; member 33 struct rb_node rb_node; member
|
| A D | env.c | 43 struct rb_node *parent = NULL; in __perf_env__insert_bpf_prog_info() 44 struct rb_node **p; in __perf_env__insert_bpf_prog_info() 46 p = &env->bpf_progs.infos.rb_node; in __perf_env__insert_bpf_prog_info() 71 struct rb_node *n; in perf_env__find_bpf_prog_info() 74 n = env->bpf_progs.infos.rb_node; in perf_env__find_bpf_prog_info() 97 struct rb_node *first; in perf_env__iterate_bpf_prog_info() 118 struct rb_node *parent = NULL; in __perf_env__insert_btf() 121 struct rb_node **p; in __perf_env__insert_btf() 157 struct rb_node *n; in __perf_env__find_btf() 159 n = env->bpf_progs.btfs.rb_node; in __perf_env__find_btf() [all …]
|
| A D | hist.c | 686 struct rb_node **p; in hists__findnew_entry() 1631 struct rb_node **p = &root->rb_root.rb_node; in hierarchy_insert_entry() 1752 struct rb_node **p = &root->rb_root.rb_node; in hists__collapse_insert_entry() 1935 struct rb_node **p = &root->rb_root.rb_node; in hierarchy_insert_output_entry() 2022 struct rb_node **p = &entries->rb_root.rb_node; in __hists__insert_output_entry() 2160 struct rb_node *rb_hierarchy_last(struct rb_node *node) in rb_hierarchy_last() 2190 struct rb_node *rb_hierarchy_prev(struct rb_node *node) in rb_hierarchy_prev() 2335 struct rb_node *nd; in hists__filter_by_type() 2355 struct rb_node **p = &root->rb_root.rb_node; in resort_filtered_entry() 2636 struct rb_node *n; in hists__find_entry() [all …]
|
| A 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() 1009 struct rb_node *n = tree->rb_root.rb_node; in srcline__tree_find() 1013 rb_node); in srcline__tree_find() 1033 next = rb_next(&pos->rb_node); in srcline__tree_delete() 1071 struct rb_node **p = &tree->rb_root.rb_node; in inlines__tree_insert() 1072 struct rb_node *parent = NULL; in inlines__tree_insert() 1093 struct rb_node *n = tree->rb_root.rb_node; in inlines__tree_find() 1097 rb_node); in inlines__tree_find() [all …]
|
| A D | symbol.c | 211 struct rb_node *nd; in symbols__fixup_duplicate() 222 nd = rb_next(&curr->rb_node); in symbols__fixup_duplicate() 365 struct rb_node **p = &symbols->rb_root.rb_node; in __symbols__insert() 366 struct rb_node *parent = NULL; in __symbols__insert() 403 struct rb_node *n; in symbols__find() 408 n = symbols->rb_root.rb_node; in symbols__find() 446 struct rb_node *n = rb_next(&sym->rb_node); in symbols__next() 464 struct rb_node *nd; in symbols__sort_by_name() 1033 struct rb_node rb_node; member 1040 struct rb_node **p = &modules->rb_node; in add_module() [all …]
|
| A D | stream.c | 102 struct rb_node *rb_node = rb_first(root); in update_hot_callchain() local 105 while (rb_node) { in update_hot_callchain() 106 cnode = rb_entry(rb_node, struct callchain_node, rb_node); in update_hot_callchain() 108 rb_node = rb_next(rb_node); in update_hot_callchain() 114 struct rb_node *next = rb_first_cached(&hists->entries); in init_hot_callchain() 119 he = rb_entry(next, struct hist_entry, rb_node); in init_hot_callchain() 121 next = rb_next(&he->rb_node); in init_hot_callchain()
|
| /tools/lib/ |
| A D | rbtree.c | 64 static inline struct rb_node *rb_red_parent(struct rb_node *red) in rb_red_parent() 75 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() 86 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() 228 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() 411 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() 454 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() 464 struct rb_node *n; in rb_first() 486 struct rb_node *rb_next(const struct rb_node *node) in rb_next() 517 struct rb_node *rb_prev(const struct rb_node *node) in rb_prev() 545 void rb_replace_node(struct rb_node *victim, struct rb_node *new, in rb_replace_node() [all …]
|
| /tools/perf/tests/ |
| A 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() 246 struct rb_node *node; in test2() 302 struct rb_node *node; in test3() 376 struct rb_node *node; in test4() [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A D | bpf_qdisc_fq.c | 82 struct bpf_rb_node rb_node; member 462 struct bpf_rb_node *rb_node; in fq_dequeue_nonprio_flows() local 498 rb_node = bpf_rbtree_first(&flow->queue); in fq_dequeue_nonprio_flows() 499 if (!rb_node) { in fq_dequeue_nonprio_flows() 511 skbn = container_of(rb_node, struct skb_node, node); in fq_dequeue_nonprio_flows() 523 rb_node = bpf_rbtree_remove(&flow->queue, rb_node); in fq_dequeue_nonprio_flows() 526 if (!rb_node) in fq_dequeue_nonprio_flows() 551 struct bpf_rb_node *rb_node; in fq_dequeue_prio() local 565 rb_node = bpf_rbtree_first(&flow->queue); in fq_dequeue_prio() 566 if (!rb_node) { in fq_dequeue_prio() [all …]
|
| /tools/perf/ui/browsers/ |
| A 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() 118 struct rb_node *nd; in map__browse() 123 struct symbol *pos = rb_entry(nd, struct symbol, rb_node); in map__browse()
|
| /tools/perf/ui/stdio/ |
| A D | hist.c | 117 struct rb_node *node, *next; in __callchain__fprintf_graph() 229 struct rb_node *node; in callchain__fprintf_graph() 315 struct rb_node *rb_node = rb_first(tree); in callchain__fprintf_flat() local 317 while (rb_node) { in callchain__fprintf_flat() 318 chain = rb_entry(rb_node, struct callchain_node, rb_node); in callchain__fprintf_flat() 328 rb_node = rb_next(rb_node); in callchain__fprintf_flat() 366 struct rb_node *rb_node = rb_first(tree); in callchain__fprintf_folded() local 368 while (rb_node) { in callchain__fprintf_folded() 370 chain = rb_entry(rb_node, struct callchain_node, rb_node); in callchain__fprintf_folded() 379 rb_node = rb_next(rb_node); in callchain__fprintf_folded() [all …]
|
| /tools/sched_ext/ |
| A D | scx_flatcg.bpf.c | 102 struct bpf_rb_node rb_node; member 144 cgc_a = container_of(a, struct cgv_node, rb_node); in cgv_node_less() 145 cgc_b = container_of(b, struct cgv_node, rb_node); in cgv_node_less() 302 bpf_rbtree_add(&cgv_tree, &cgv_node->rb_node, cgv_node_less); in cgrp_enqueued() 609 struct bpf_rb_node *rb_node; in try_pick_next_cgroup() local 619 rb_node = bpf_rbtree_first(&cgv_tree); in try_pick_next_cgroup() 620 if (!rb_node) { in try_pick_next_cgroup() 627 rb_node = bpf_rbtree_remove(&cgv_tree, rb_node); in try_pick_next_cgroup() 630 if (!rb_node) { in try_pick_next_cgroup() 640 cgv_node = container_of(rb_node, struct cgv_node, rb_node); in try_pick_next_cgroup() [all …]
|
| /tools/bpf/resolve_btfids/ |
| A D | main.c | 102 struct rb_node rb_node; member 180 struct rb_node *p = root->rb_node; in btf_id__find() 185 id = rb_entry(p, struct btf_id, rb_node); in btf_id__find() 200 struct rb_node **p = &root->rb_node; in btf_id__add() 201 struct rb_node *parent = NULL; in btf_id__add() 207 id = rb_entry(parent, struct btf_id, rb_node); in btf_id__add() 221 rb_link_node(&id->rb_node, parent, p); in btf_id__add() 222 rb_insert_color(&id->rb_node, root); in btf_id__add() 657 struct rb_node *next; in __symbols_patch() 662 id = rb_entry(next, struct btf_id, rb_node); in __symbols_patch() [all …]
|