/tools/lib/ |
D | rbtree.c | 72 __rb_insert(struct rb_node *node, struct rb_root *root, in __rb_insert() argument 75 struct rb_node *parent = rb_red_parent(node), *gparent, *tmp; in __rb_insert() 86 rb_set_parent_color(node, NULL, RB_BLACK); in __rb_insert() 111 node = gparent; in __rb_insert() 112 parent = rb_parent(node); in __rb_insert() 113 rb_set_parent_color(node, parent, RB_RED); in __rb_insert() 118 if (node == tmp) { in __rb_insert() 131 parent->rb_right = tmp = node->rb_left; in __rb_insert() 132 node->rb_left = parent; in __rb_insert() 136 rb_set_parent_color(parent, node, RB_RED); in __rb_insert() [all …]
|
/tools/perf/tests/ |
D | hists_output.c | 98 struct rb_node *node; in del_hist_entries() local 108 node = rb_first(root_out); in del_hist_entries() 110 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 111 rb_erase(node, root_out); in del_hist_entries() 132 struct rb_node *node; in test1() local 167 node = rb_first(root); in test1() 168 he = rb_entry(node, struct hist_entry, rb_node); in test1() 173 node = rb_next(node); in test1() 174 he = rb_entry(node, struct hist_entry, rb_node); in test1() 179 node = rb_next(node); in test1() [all …]
|
D | hists_common.c | 161 struct rb_node *node; in print_hists_in() local 169 node = rb_first(root); in print_hists_in() 170 while (node) { in print_hists_in() 173 he = rb_entry(node, struct hist_entry, rb_node_in); in print_hists_in() 183 node = rb_next(node); in print_hists_in() 191 struct rb_node *node; in print_hists_out() local 196 node = rb_first(root); in print_hists_out() 197 while (node) { in print_hists_out() 200 he = rb_entry(node, struct hist_entry, rb_node); in print_hists_out() 211 node = rb_next(node); in print_hists_out()
|
D | hists_link.c | 155 struct rb_node *node; in __validate_match() local 165 node = rb_first(root); in __validate_match() 166 while (node) { in __validate_match() 169 he = rb_entry(node, struct hist_entry, rb_node_in); in __validate_match() 182 node = rb_next(node); in __validate_match() 205 struct rb_node *node; in __validate_link() local 217 node = rb_first(root); in __validate_link() 218 while (node) { in __validate_link() 221 he = rb_entry(node, struct hist_entry, rb_node_in); in __validate_link() 239 node = rb_next(node); in __validate_link()
|
D | hists_cumulate.c | 132 struct rb_node *node; in del_hist_entries() local 142 node = rb_first(root_out); in del_hist_entries() 144 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 145 rb_erase(node, root_out); in del_hist_entries() 175 } node[10]; member 185 struct rb_node *node; in do_test() local 204 for (node = rb_first(root), i = 0; in do_test() 205 node && (he = rb_entry(node, struct hist_entry, rb_node)); in do_test() 206 node = rb_next(node), i++) { in do_test() 223 root = &he->callchain->node.rb_root; in do_test() [all …]
|
D | switch-tracking.c | 207 struct event_node *node; in add_event() local 209 node = malloc(sizeof(struct event_node)); in add_event() 210 if (!node) { in add_event() 214 node->event = event; in add_event() 215 list_add(&node->list, events); in add_event() 227 node->event_time = sample.time; in add_event() 234 struct event_node *node; in free_event_nodes() local 237 node = list_entry(events->next, struct event_node, list); in free_event_nodes() 238 list_del(&node->list); in free_event_nodes() 239 free(node); in free_event_nodes() [all …]
|
/tools/perf/util/ |
D | strfilter.c | 13 static void strfilter_node__delete(struct strfilter_node *node) in strfilter_node__delete() argument 15 if (node) { in strfilter_node__delete() 16 if (node->p && !is_operator(*node->p)) in strfilter_node__delete() 17 zfree((char **)&node->p); in strfilter_node__delete() 18 strfilter_node__delete(node->l); in strfilter_node__delete() 19 strfilter_node__delete(node->r); in strfilter_node__delete() 20 free(node); in strfilter_node__delete() 65 struct strfilter_node *node = zalloc(sizeof(*node)); in strfilter_node__alloc() local 67 if (node) { in strfilter_node__alloc() 68 node->p = op; in strfilter_node__alloc() [all …]
|
D | intlist.c | 19 struct int_node *node = malloc(sizeof(*node)); in intlist__node_new() local 21 if (node != NULL) { in intlist__node_new() 22 node->i = i; in intlist__node_new() 23 node->priv = NULL; in intlist__node_new() 24 rc = &node->rb_node; in intlist__node_new() 38 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_delete() local 40 int_node__delete(node); in intlist__node_delete() 46 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_cmp() local 48 return node->i - i; in intlist__node_cmp() 56 void intlist__remove(struct intlist *ilist, struct int_node *node) in intlist__remove() argument [all …]
|
D | callchain.c | 244 __sort_chain_flat(struct rb_root *rb_root, struct callchain_node *node, in __sort_chain_flat() argument 250 n = rb_first(&node->rb_root_in); in __sort_chain_flat() 258 if (node->hit && node->hit >= min_hit) in __sort_chain_flat() 259 rb_insert_callchain(rb_root, node, CHAIN_FLAT); in __sort_chain_flat() 270 __sort_chain_flat(rb_root, &root->node, min_hit); in sort_chain_flat() 273 static void __sort_chain_graph_abs(struct callchain_node *node, in __sort_chain_graph_abs() argument 279 node->rb_root = RB_ROOT; in __sort_chain_graph_abs() 280 n = rb_first(&node->rb_root_in); in __sort_chain_graph_abs() 288 rb_insert_callchain(&node->rb_root, child, in __sort_chain_graph_abs() 297 __sort_chain_graph_abs(&chain_root->node, min_hit); in sort_chain_graph_abs() [all …]
|
D | callchain.h | 68 struct callchain_node node; member 133 INIT_LIST_HEAD(&root->node.val); in callchain_init() 135 root->node.parent = NULL; in callchain_init() 136 root->node.hit = 0; in callchain_init() 137 root->node.children_hit = 0; in callchain_init() 138 root->node.rb_root_in = RB_ROOT; in callchain_init() 142 static inline u64 callchain_cumul_hits(struct callchain_node *node) in callchain_cumul_hits() argument 144 return node->hit + node->children_hit; in callchain_cumul_hits() 201 int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
|
D | rblist.c | 120 struct rb_node *node; in rblist__entry() local 122 for (node = rb_first(&rblist->entries); node; node = rb_next(node)) { in rblist__entry() 124 return node; in rblist__entry()
|
D | evsel.h | 21 struct hlist_node node; member 80 struct list_head node; member 312 return list_entry(evsel->node.next, struct perf_evsel, node); in perf_evsel__next() 317 return list_entry(evsel->node.prev, struct perf_evsel, node); in perf_evsel__prev() 387 for ((_evsel) = list_entry((_leader)->node.next, struct perf_evsel, node); \ 389 (_evsel) = list_entry((_evsel)->node.next, struct perf_evsel, node))
|
D | sort.h | 84 struct list_head node; member 130 return !list_empty(&he->pairs.node); in hist_entry__has_pairs() 136 return list_entry(he->pairs.node.next, struct hist_entry, pairs.node); in hist_entry__next_pair() 143 list_add_tail(&pair->pairs.node, &he->pairs.head); in hist_entry__add_pair()
|
D | annotate.c | 768 list_add_tail(&line->node, head); in disasm__add() 773 list_for_each_entry_continue(pos, head, node) in disasm__get_next_ip_line() 869 list_for_each_entry_from(queue, ¬es->src->source, node) { in disasm_line__print() 1058 dl = list_entry(list->prev, struct disasm_line, node); in delete_last_nop() 1070 list_del(&dl->node); in delete_last_nop() 1268 iter = rb_entry(parent, struct source_line, node); in insert_source_line() 1286 rb_link_node(&src_line->node, parent, p); in insert_source_line() 1287 rb_insert_color(&src_line->node, root); in insert_source_line() 1311 iter = rb_entry(parent, struct source_line, node); in __resort_source_line() 1319 rb_link_node(&src_line->node, parent, p); in __resort_source_line() [all …]
|
D | evlist.h | 189 return list_entry(evlist->entries.next, struct perf_evsel, node); in perf_evlist__first() 194 return list_entry(evlist->entries.prev, struct perf_evsel, node); in perf_evlist__last() 231 list_for_each_entry(evsel, list, node) 247 list_for_each_entry_continue(evsel, list, node) 263 list_for_each_entry_reverse(evsel, list, node) 280 list_for_each_entry_safe(evsel, tmp, list, node)
|
/tools/include/linux/ |
D | rbtree.h | 55 #define RB_EMPTY_NODE(node) \ argument 56 ((node)->__rb_parent_color == (unsigned long)(node)) 57 #define RB_CLEAR_NODE(node) \ argument 58 ((node)->__rb_parent_color = (unsigned long)(node)) 79 static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, in rb_link_node() argument 82 node->__rb_parent_color = (unsigned long)parent; in rb_link_node() 83 node->rb_left = node->rb_right = NULL; in rb_link_node() 85 *rb_link = node; in rb_link_node()
|
D | rbtree_augmented.h | 42 void (*propagate)(struct rb_node *node, struct rb_node *stop); 47 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 60 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument 63 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 72 rbstruct *node = rb_entry(rb, rbstruct, rbfield); \ 73 rbtype augmented = rbcompute(node); \ 74 if (node->rbaugmented == augmented) \ 76 node->rbaugmented = augmented; \ 77 rb = rb_parent(&node->rbfield); \ 140 __rb_erase_augmented(struct rb_node *node, struct rb_root *root, in __rb_erase_augmented() argument [all …]
|
/tools/perf/ |
D | builtin-kmem.c | 57 struct rb_node node; member 71 struct rb_node **node = &root_alloc_stat.rb_node; in insert_alloc_stat() local 75 while (*node) { in insert_alloc_stat() 76 parent = *node; in insert_alloc_stat() 77 data = rb_entry(*node, struct alloc_stat, node); in insert_alloc_stat() 80 node = &(*node)->rb_right; in insert_alloc_stat() 82 node = &(*node)->rb_left; in insert_alloc_stat() 103 rb_link_node(&data->node, parent, node); in insert_alloc_stat() 104 rb_insert_color(&data->node, &root_alloc_stat); in insert_alloc_stat() 114 struct rb_node **node = &root_caller_stat.rb_node; in insert_caller_stat() local [all …]
|
D | builtin-lock.c | 120 struct rb_node *node; in thread_stat_find() local 123 node = thread_stats.rb_node; in thread_stat_find() 124 while (node) { in thread_stat_find() 125 st = container_of(node, struct thread_stat, rb); in thread_stat_find() 129 node = node->rb_left; in thread_stat_find() 131 node = node->rb_right; in thread_stat_find() 301 struct rb_node *node = result.rb_node; in pop_from_result() local 303 if (!node) in pop_from_result() 306 while (node->rb_left) in pop_from_result() 307 node = node->rb_left; in pop_from_result() [all …]
|
/tools/lib/lockdep/ |
D | preload.c | 31 struct rb_node node; member 101 struct rb_node **node = &locks.rb_node; in __get_lock_node() local 106 while (*node) { in __get_lock_node() 107 l = rb_entry(*node, struct lock_lookup, node); in __get_lock_node() 109 *parent = *node; in __get_lock_node() 111 node = &l->node.rb_left; in __get_lock_node() 113 node = &l->node.rb_right; in __get_lock_node() 115 return node; in __get_lock_node() 118 return node; in __get_lock_node() 177 struct rb_node **node, *parent; in __get_lock() local [all …]
|
/tools/perf/ui/stdio/ |
D | hist.c | 84 struct rb_node *node, *next; in __callchain__fprintf_graph() local 95 node = rb_first(root); in __callchain__fprintf_graph() 96 while (node) { in __callchain__fprintf_graph() 100 child = rb_entry(node, struct callchain_node, rb_node); in __callchain__fprintf_graph() 111 next = rb_next(node); in __callchain__fprintf_graph() 139 node = next; in __callchain__fprintf_graph() 166 struct rb_node *node; in callchain__fprintf_graph() local 176 node = rb_first(root); in callchain__fprintf_graph() 177 if (node && !rb_next(node)) { in callchain__fprintf_graph() 178 cnode = rb_entry(node, struct callchain_node, rb_node); in callchain__fprintf_graph() [all …]
|
/tools/testing/selftests/x86/ |
D | test_vsyscall.c | 174 static inline long sys_getcpu(unsigned * cpu, unsigned * node, in sys_getcpu() argument 177 return syscall(SYS_getcpu, cpu, node, cache); in sys_getcpu() 323 unsigned node = 0; in test_getcpu() local 338 node = node_sys; in test_getcpu() 348 node = node_vdso; in test_getcpu() 358 if (node_vdso != node) { in test_getcpu() 359 printf("[FAIL]\tvDSO reported node %hu but should be %hu\n", node_vdso, node); in test_getcpu() 374 node = node_vsys; in test_getcpu() 384 if (node_vsys != node) { in test_getcpu() 385 printf("[FAIL]\tvsyscall reported node %hu but should be %hu\n", node_vsys, node); in test_getcpu()
|
/tools/perf/bench/ |
D | numa.c | 233 static int is_node_present(int node) in is_node_present() argument 235 return numa_bitmask_isbitset(numa_nodes_ptr, node); in is_node_present() 241 static bool node_has_cpus(int node) in node_has_cpus() argument 246 if (cpu && !numa_node_to_cpus(node, cpu)) { in node_has_cpus() 333 static void bind_to_memnode(int node) in bind_to_memnode() argument 338 if (node == -1) in bind_to_memnode() 342 nodemask = 1L << node; in bind_to_memnode() 345 dprintf("binding to node %d, mask: %016lx => %d\n", node, nodemask, ret); in bind_to_memnode() 373 int node = numa_node_of_cpu(0); in alloc_data() local 375 orig_mask = bind_to_node(node); in alloc_data() [all …]
|
/tools/perf/ui/gtk/ |
D | hists.c | 99 struct callchain_node *node; in perf_gtk__add_callchain() local 106 node = rb_entry(nd, struct callchain_node, rb_node); in perf_gtk__add_callchain() 108 hits = callchain_cumul_hits(node); in perf_gtk__add_callchain() 112 need_new_parent = !has_single_node && (node->val_nr > 1); in perf_gtk__add_callchain() 114 list_for_each_entry(chain, &node->val, list) { in perf_gtk__add_callchain() 136 child_total = node->children_hit; in perf_gtk__add_callchain() 141 perf_gtk__add_callchain(&node->rb_root, store, &iter, col, in perf_gtk__add_callchain()
|
/tools/perf/ui/browsers/ |
D | hists.c | 156 static int callchain_node__count_rows_rb_tree(struct callchain_node *node) in callchain_node__count_rows_rb_tree() argument 161 for (nd = rb_first(&node->rb_root); nd; nd = rb_next(nd)) { in callchain_node__count_rows_rb_tree() 181 static int callchain_node__count_rows(struct callchain_node *node) in callchain_node__count_rows() argument 187 list_for_each_entry(chain, &node->val, list) { in callchain_node__count_rows() 193 n += callchain_node__count_rows_rb_tree(node); in callchain_node__count_rows() 204 struct callchain_node *node = rb_entry(nd, struct callchain_node, rb_node); in callchain__count_rows() local 205 n += callchain_node__count_rows(node); in callchain__count_rows() 235 static void callchain_node__init_have_children_rb_tree(struct callchain_node *node) in callchain_node__init_have_children_rb_tree() argument 237 struct rb_node *nd = rb_first(&node->rb_root); in callchain_node__init_have_children_rb_tree() 239 for (nd = rb_first(&node->rb_root); nd; nd = rb_next(nd)) { in callchain_node__init_have_children_rb_tree() [all …]
|