/tools/lib/ |
D | rbtree.c | 85 __rb_insert(struct rb_node *node, struct rb_root *root, in __rb_insert() argument 88 struct rb_node *parent = rb_red_parent(node), *gparent, *tmp; in __rb_insert() 100 rb_set_parent_color(node, NULL, RB_BLACK); in __rb_insert() 133 node = gparent; in __rb_insert() 134 parent = rb_parent(node); in __rb_insert() 135 rb_set_parent_color(node, parent, RB_RED); in __rb_insert() 140 if (node == tmp) { in __rb_insert() 154 tmp = node->rb_left; in __rb_insert() 156 WRITE_ONCE(node->rb_left, parent); in __rb_insert() 160 rb_set_parent_color(parent, node, RB_RED); in __rb_insert() [all …]
|
/tools/perf/tests/ |
D | hists_output.c | 97 struct rb_node *node; in del_hist_entries() local 107 node = rb_first_cached(root_out); in del_hist_entries() 109 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 110 rb_erase_cached(node, root_out); in del_hist_entries() 131 struct rb_node *node; in test1() local 166 node = rb_first_cached(root); in test1() 167 he = rb_entry(node, struct hist_entry, rb_node); in test1() 172 node = rb_next(node); in test1() 173 he = rb_entry(node, struct hist_entry, rb_node); in test1() 178 node = rb_next(node); in test1() [all …]
|
D | mem2node.c | 13 static struct node { struct 14 int node; member 17 { .node = 0, .map = "0" }, argument 18 { .node = 1, .map = "1-2" }, 19 { .node = 3, .map = "5-7,9" }, 58 nodes[i].node = test_nodes[i].node; in test__mem2node()
|
D | hists_common.c | 167 struct rb_node *node; in print_hists_in() local 175 node = rb_first_cached(root); in print_hists_in() 176 while (node) { in print_hists_in() 179 he = rb_entry(node, struct hist_entry, rb_node_in); in print_hists_in() 189 node = rb_next(node); in print_hists_in() 197 struct rb_node *node; in print_hists_out() local 202 node = rb_first_cached(root); in print_hists_out() 203 while (node) { in print_hists_out() 206 he = rb_entry(node, struct hist_entry, rb_node); in print_hists_out() 217 node = rb_next(node); in print_hists_out()
|
/tools/perf/util/ |
D | strfilter.c | 19 static void strfilter_node__delete(struct strfilter_node *node) in strfilter_node__delete() argument 21 if (node) { in strfilter_node__delete() 22 if (node->p && !is_operator(*node->p)) in strfilter_node__delete() 23 zfree((char **)&node->p); in strfilter_node__delete() 24 strfilter_node__delete(node->l); in strfilter_node__delete() 25 strfilter_node__delete(node->r); in strfilter_node__delete() 26 free(node); in strfilter_node__delete() 70 struct strfilter_node *node = zalloc(sizeof(*node)); in strfilter_node__alloc() local 72 if (node) { in strfilter_node__alloc() 73 node->p = op; in strfilter_node__alloc() [all …]
|
D | intlist.c | 18 struct int_node *node = malloc(sizeof(*node)); in intlist__node_new() local 20 if (node != NULL) { in intlist__node_new() 21 node->i = i; in intlist__node_new() 22 node->priv = NULL; in intlist__node_new() 23 rc = &node->rb_node; in intlist__node_new() 37 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_delete() local 39 int_node__delete(node); in intlist__node_delete() 45 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_cmp() local 47 return node->i - i; in intlist__node_cmp() 55 void intlist__remove(struct intlist *ilist, struct int_node *node) in intlist__remove() argument [all …]
|
D | block-range.c | 23 struct block_range *entry = rb_entry(rb, struct block_range, node); in block_range__debug() 41 entry = rb_entry(parent, struct block_range, node); in block_range__find() 54 static inline void rb_link_left_of_node(struct rb_node *left, struct rb_node *node) in rb_link_left_of_node() argument 56 struct rb_node **p = &node->rb_left; in rb_link_left_of_node() 58 node = *p; in rb_link_left_of_node() 59 p = &node->rb_right; in rb_link_left_of_node() 61 rb_link_node(left, node, p); in rb_link_left_of_node() 64 static inline void rb_link_right_of_node(struct rb_node *right, struct rb_node *node) in rb_link_right_of_node() argument 66 struct rb_node **p = &node->rb_right; in rb_link_right_of_node() 68 node = *p; in rb_link_right_of_node() [all …]
|
D | callchain.c | 413 __sort_chain_flat(struct rb_root *rb_root, struct callchain_node *node, in __sort_chain_flat() argument 419 n = rb_first(&node->rb_root_in); in __sort_chain_flat() 427 if (node->hit && node->hit >= min_hit) in __sort_chain_flat() 428 rb_insert_callchain(rb_root, node, CHAIN_FLAT); in __sort_chain_flat() 440 __sort_chain_flat(rb_root, &root->node, min_hit); in sort_chain_flat() 443 static void __sort_chain_graph_abs(struct callchain_node *node, in __sort_chain_graph_abs() argument 449 node->rb_root = RB_ROOT; in __sort_chain_graph_abs() 450 n = rb_first(&node->rb_root_in); in __sort_chain_graph_abs() 458 rb_insert_callchain(&node->rb_root, child, in __sort_chain_graph_abs() 467 __sort_chain_graph_abs(&chain_root->node, min_hit); in sort_chain_graph_abs() [all …]
|
D | evsel_fprintf.c | 109 struct callchain_cursor_node *node; in sample__fprintf_callchain() local 130 node = callchain_cursor_current(cursor); in sample__fprintf_callchain() 131 if (!node) in sample__fprintf_callchain() 134 if (node->sym && node->sym->ignore && print_skip_ignored) in sample__fprintf_callchain() 143 printed += fprintf(fp, "%c%16" PRIx64, s, node->ip); in sample__fprintf_callchain() 145 if (node->map) in sample__fprintf_callchain() 146 addr = node->map->map_ip(node->map, node->ip); in sample__fprintf_callchain() 151 node_al.map = node->map; in sample__fprintf_callchain() 154 printed += __symbol__fprintf_symname_offs(node->sym, &node_al, in sample__fprintf_callchain() 158 printed += __symbol__fprintf_symname(node->sym, &node_al, in sample__fprintf_callchain() [all …]
|
D | env.c | 27 struct bpf_prog_info_node *node; in __perf_env__insert_bpf_prog_info() local 35 node = rb_entry(parent, struct bpf_prog_info_node, rb_node); in __perf_env__insert_bpf_prog_info() 36 if (prog_id < node->info_linear->info.id) { in __perf_env__insert_bpf_prog_info() 38 } else if (prog_id > node->info_linear->info.id) { in __perf_env__insert_bpf_prog_info() 54 struct bpf_prog_info_node *node = NULL; in perf_env__find_bpf_prog_info() local 61 node = rb_entry(n, struct bpf_prog_info_node, rb_node); in perf_env__find_bpf_prog_info() 62 if (prog_id < node->info_linear->info.id) in perf_env__find_bpf_prog_info() 64 else if (prog_id > node->info_linear->info.id) in perf_env__find_bpf_prog_info() 69 node = NULL; in perf_env__find_bpf_prog_info() 73 return node; in perf_env__find_bpf_prog_info() [all …]
|
D | callchain.h | 76 struct callchain_node node; member 167 INIT_LIST_HEAD(&root->node.val); in callchain_init() 168 INIT_LIST_HEAD(&root->node.parent_val); in callchain_init() 170 root->node.parent = NULL; in callchain_init() 171 root->node.hit = 0; in callchain_init() 172 root->node.children_hit = 0; in callchain_init() 173 root->node.rb_root_in = RB_ROOT; in callchain_init() 177 static inline u64 callchain_cumul_hits(struct callchain_node *node) in callchain_cumul_hits() argument 179 return node->hit + node->children_hit; in callchain_cumul_hits() 182 static inline unsigned callchain_cumul_counts(struct callchain_node *node) in callchain_cumul_counts() argument [all …]
|
D | srcline.c | 40 struct inline_node *node) in inline_list__append() argument 52 list_add_tail(&ilist->list, &node->val); in inline_list__append() 54 list_add(&ilist->list, &node->val); in inline_list__append() 279 struct inline_node *node, in inline_list__append_dso_a2l() argument 289 return inline_list__append(inline_sym, srcline, node); in inline_list__append_dso_a2l() 294 bool unwind_inlines, struct inline_node *node, in addr2line() argument 322 if (node && inline_list__append_dso_a2l(dso, node, sym)) in addr2line() 332 if (node != NULL) { in addr2line() 333 if (inline_list__append_dso_a2l(dso, node, sym)) in addr2line() 367 struct inline_node *node; in addr2inlines() local [all …]
|
D | mem2node.c | 15 u64 node; member 39 phys_entry__init(struct phys_entry *entry, u64 start, u64 bsize, u64 node) in phys_entry__init() argument 43 entry->node = node; in phys_entry__init() 87 (prev->node == n->node)) { in mem2node__init() 93 phys_entry__init(&entries[j++], start, bsize, n->node); in mem2node__init() 104 entries[i].node, entries[i].start, entries[i].end); in mem2node__init() 137 return entry ? (int) entry->node : -1; in mem2node__node()
|
D | config.h | 12 struct list_head node; member 19 struct list_head node; member 50 list_for_each_entry(section, list, node) 58 list_for_each_entry(item, list, node)
|
D | rblist.c | 131 struct rb_node *node; in rblist__entry() local 133 for (node = rb_first_cached(&rblist->entries); node; in rblist__entry() 134 node = rb_next(node)) { in rblist__entry() 136 return node; in rblist__entry()
|
/tools/include/linux/ |
D | rbtree_augmented.h | 30 void (*propagate)(struct rb_node *node, struct rb_node *stop); 35 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 49 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument 52 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 56 rb_insert_augmented_cached(struct rb_node *node, in rb_insert_augmented_cached() argument 61 root->rb_leftmost = node; in rb_insert_augmented_cached() 62 rb_insert_augmented(node, &root->rb_root, augment); in rb_insert_augmented_cached() 82 RBSTRUCT *node = rb_entry(rb, RBSTRUCT, RBFIELD); \ 83 if (RBCOMPUTE(node, true)) \ 85 rb = rb_parent(&node->RBFIELD); \ [all …]
|
D | rbtree.h | 42 #define RB_EMPTY_NODE(node) \ argument 43 ((node)->__rb_parent_color == (unsigned long)(node)) 44 #define RB_CLEAR_NODE(node) \ argument 45 ((node)->__rb_parent_color = (unsigned long)(node)) 66 static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, in rb_link_node() argument 69 node->__rb_parent_color = (unsigned long)parent; in rb_link_node() 70 node->rb_left = node->rb_right = NULL; in rb_link_node() 72 *rb_link = node; in rb_link_node() 129 static inline void rb_insert_color_cached(struct rb_node *node, in rb_insert_color_cached() argument 134 root->rb_leftmost = node; in rb_insert_color_cached() [all …]
|
D | hashtable.h | 57 #define hash_add(hashtable, node, key) \ argument 58 hlist_add_head(node, &hashtable[hash_min(key, HASH_BITS(hashtable))]) 64 static inline bool hash_hashed(struct hlist_node *node) in hash_hashed() argument 66 return !hlist_unhashed(node); in hash_hashed() 93 static inline void hash_del(struct hlist_node *node) in hash_del() argument 95 hlist_del_init(node); in hash_del()
|
/tools/testing/selftests/rseq/ |
D | basic_percpu_ops_test.c | 135 struct percpu_list_node *node, in this_cpu_list_push() argument 147 newval = (intptr_t)node; in this_cpu_list_push() 149 node->next = (struct percpu_list_node *)expect; in this_cpu_list_push() 197 struct percpu_list_node *node; in __percpu_list_pop() local 199 node = list->c[cpu].head; in __percpu_list_pop() 200 if (!node) in __percpu_list_pop() 202 list->c[cpu].head = node->next; in __percpu_list_pop() 203 return node; in __percpu_list_pop() 218 struct percpu_list_node *node; in test_percpu_list_thread() local 220 node = this_cpu_list_pop(list, NULL); in test_percpu_list_thread() [all …]
|
D | param_test.c | 512 struct percpu_list_node *node, in this_cpu_list_push() argument 524 newval = (intptr_t)node; in this_cpu_list_push() 526 node->next = (struct percpu_list_node *)expect; in this_cpu_list_push() 544 struct percpu_list_node *node = NULL; in this_cpu_list_pop() local 561 node = head; in this_cpu_list_pop() 570 return node; in this_cpu_list_pop() 579 struct percpu_list_node *node; in __percpu_list_pop() local 581 node = list->c[cpu].head; in __percpu_list_pop() 582 if (!node) in __percpu_list_pop() 584 list->c[cpu].head = node->next; in __percpu_list_pop() [all …]
|
/tools/testing/radix-tree/ |
D | linux.c | 30 struct radix_tree_node *node; in kmem_cache_alloc() local 38 node = cachep->objs; in kmem_cache_alloc() 39 cachep->objs = node->parent; in kmem_cache_alloc() 41 node->parent = NULL; in kmem_cache_alloc() 44 node = malloc(cachep->size); in kmem_cache_alloc() 46 cachep->ctor(node); in kmem_cache_alloc() 51 printf("Allocating %p from slab\n", node); in kmem_cache_alloc() 52 return node; in kmem_cache_alloc() 66 struct radix_tree_node *node = objp; in kmem_cache_free() local 68 node->parent = cachep->objs; in kmem_cache_free() [all …]
|
/tools/testing/selftests/net/ |
D | reuseport_bpf_numa.c | 197 int epfd, node; in test() local 205 for (node = 0; node < len; ++node) { in test() 207 ev.data.fd = rcv_fd[node]; in test() 208 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[node], &ev)) in test() 213 for (node = 0; node < len; ++node) { in test() 214 send_from_node(node, family, proto); in test() 215 receive_on_node(rcv_fd, len, epfd, node, proto); in test() 219 for (node = len - 1; node >= 0; --node) { in test() 220 send_from_node(node, family, proto); in test() 221 receive_on_node(rcv_fd, len, epfd, node, proto); in test() [all …]
|
/tools/lib/lockdep/ |
D | preload.c | 33 struct rb_node node; member 103 struct rb_node **node = &locks.rb_node; in __get_lock_node() local 108 while (*node) { in __get_lock_node() 109 l = rb_entry(*node, struct lock_lookup, node); in __get_lock_node() 111 *parent = *node; in __get_lock_node() 113 node = &l->node.rb_left; in __get_lock_node() 115 node = &l->node.rb_right; in __get_lock_node() 117 return node; in __get_lock_node() 120 return node; in __get_lock_node() 177 struct rb_node **node, *parent; in __get_lock() local [all …]
|
/tools/perf/ |
D | builtin-kmem.c | 70 struct rb_node node; member 88 struct rb_node **node = &root_alloc_stat.rb_node; in insert_alloc_stat() local 92 while (*node) { in insert_alloc_stat() 93 parent = *node; in insert_alloc_stat() 94 data = rb_entry(*node, struct alloc_stat, node); in insert_alloc_stat() 97 node = &(*node)->rb_right; in insert_alloc_stat() 99 node = &(*node)->rb_left; in insert_alloc_stat() 120 rb_link_node(&data->node, parent, node); in insert_alloc_stat() 121 rb_insert_color(&data->node, &root_alloc_stat); in insert_alloc_stat() 133 struct rb_node **node = &root_caller_stat.rb_node; in insert_caller_stat() local [all …]
|
/tools/perf/ui/gtk/ |
D | hists.c | 104 struct callchain_node *node; in perf_gtk__add_callchain_flat() local 109 node = rb_entry(nd, struct callchain_node, rb_node); in perf_gtk__add_callchain_flat() 114 callchain_node__make_parent_list(node); in perf_gtk__add_callchain_flat() 116 list_for_each_entry(chain, &node->parent_val, list) { in perf_gtk__add_callchain_flat() 121 callchain_node__scnprintf_value(node, buf, sizeof(buf), total); in perf_gtk__add_callchain_flat() 137 list_for_each_entry(chain, &node->val, list) { in perf_gtk__add_callchain_flat() 142 callchain_node__scnprintf_value(node, buf, sizeof(buf), total); in perf_gtk__add_callchain_flat() 166 struct callchain_node *node; in perf_gtk__add_callchain_folded() local 173 node = rb_entry(nd, struct callchain_node, rb_node); in perf_gtk__add_callchain_folded() 175 callchain_node__make_parent_list(node); in perf_gtk__add_callchain_folded() [all …]
|