Lines Matching refs:node
295 __sort_chain_flat(struct rb_root *rb_root, struct callchain_node *node, in __sort_chain_flat() argument
301 n = rb_first(&node->rb_root_in); in __sort_chain_flat()
309 if (node->hit && node->hit >= min_hit) in __sort_chain_flat()
310 rb_insert_callchain(rb_root, node, CHAIN_FLAT); in __sort_chain_flat()
321 __sort_chain_flat(rb_root, &root->node, min_hit); in sort_chain_flat()
324 static void __sort_chain_graph_abs(struct callchain_node *node, in __sort_chain_graph_abs() argument
330 node->rb_root = RB_ROOT; in __sort_chain_graph_abs()
331 n = rb_first(&node->rb_root_in); in __sort_chain_graph_abs()
339 rb_insert_callchain(&node->rb_root, child, in __sort_chain_graph_abs()
348 __sort_chain_graph_abs(&chain_root->node, min_hit); in sort_chain_graph_abs()
349 rb_root->rb_node = chain_root->node.rb_root.rb_node; in sort_chain_graph_abs()
352 static void __sort_chain_graph_rel(struct callchain_node *node, in __sort_chain_graph_rel() argument
359 node->rb_root = RB_ROOT; in __sort_chain_graph_rel()
360 min_hit = ceil(node->children_hit * min_percent); in __sort_chain_graph_rel()
362 n = rb_first(&node->rb_root_in); in __sort_chain_graph_rel()
369 rb_insert_callchain(&node->rb_root, child, in __sort_chain_graph_rel()
378 __sort_chain_graph_rel(&chain_root->node, param->min_percent / 100.0); in sort_chain_graph_rel()
379 rb_root->rb_node = chain_root->node.rb_root.rb_node; in sort_chain_graph_rel()
445 fill_node(struct callchain_node *node, struct callchain_cursor *cursor) in fill_node() argument
449 node->val_nr = cursor->nr - cursor->pos; in fill_node()
450 if (!node->val_nr) in fill_node()
466 list_add_tail(&call->list, &node->val); in fill_node()
488 static s64 match_chain(struct callchain_cursor_node *node, in match_chain() argument
491 struct symbol *sym = node->sym; in match_chain()
497 return cnode->ip - node->ip; in match_chain()
537 struct callchain_cursor_node *node; in split_add_child() local
543 node = callchain_cursor_current(cursor); in split_add_child()
555 if (match_chain(node, cnode) < 0) in split_add_child()
578 struct callchain_cursor_node *node; in append_chain_children() local
582 node = callchain_cursor_current(cursor); in append_chain_children()
583 if (!node) in append_chain_children()
630 struct callchain_cursor_node *node; in append_chain() local
632 node = callchain_cursor_current(cursor); in append_chain()
633 if (!node) in append_chain()
636 cmp = match_chain(node, cnode); in append_chain()
680 append_chain_children(&root->node, cursor, period); in callchain_append()
733 return merge_chain_branch(cursor, &dst->node, &src->node); in callchain_merge()
739 struct callchain_cursor_node *node = *cursor->last; in callchain_cursor_append() local
741 if (!node) { in callchain_cursor_append()
742 node = calloc(1, sizeof(*node)); in callchain_cursor_append()
743 if (!node) in callchain_cursor_append()
746 *cursor->last = node; in callchain_cursor_append()
749 node->ip = ip; in callchain_cursor_append()
750 node->map = map; in callchain_cursor_append()
751 node->sym = sym; in callchain_cursor_append()
755 cursor->last = &node->next; in callchain_cursor_append()
782 int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node, in fill_callchain_info() argument
785 al->map = node->map; in fill_callchain_info()
786 al->sym = node->sym; in fill_callchain_info()
787 if (node->map) in fill_callchain_info()
788 al->addr = node->map->map_ip(node->map, node->ip); in fill_callchain_info()
790 al->addr = node->ip; in fill_callchain_info()
853 static void free_callchain_node(struct callchain_node *node) in free_callchain_node() argument
859 list_for_each_entry_safe(list, tmp, &node->val, list) { in free_callchain_node()
864 n = rb_first(&node->rb_root_in); in free_callchain_node()
868 rb_erase(&child->rb_node_in, &node->rb_root_in); in free_callchain_node()
880 free_callchain_node(&root->node); in free_callchain()