Lines Matching refs:node
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()
298 rb_root->rb_node = chain_root->node.rb_root.rb_node; in sort_chain_graph_abs()
301 static void __sort_chain_graph_rel(struct callchain_node *node, in __sort_chain_graph_rel() argument
308 node->rb_root = RB_ROOT; in __sort_chain_graph_rel()
309 min_hit = ceil(node->children_hit * min_percent); in __sort_chain_graph_rel()
311 n = rb_first(&node->rb_root_in); in __sort_chain_graph_rel()
318 rb_insert_callchain(&node->rb_root, child, in __sort_chain_graph_rel()
327 __sort_chain_graph_rel(&chain_root->node, param->min_percent / 100.0); in sort_chain_graph_rel()
328 rb_root->rb_node = chain_root->node.rb_root.rb_node; in sort_chain_graph_rel()
394 fill_node(struct callchain_node *node, struct callchain_cursor *cursor) in fill_node() argument
398 node->val_nr = cursor->nr - cursor->pos; in fill_node()
399 if (!node->val_nr) in fill_node()
415 list_add_tail(&call->list, &node->val); in fill_node()
437 static s64 match_chain(struct callchain_cursor_node *node, in match_chain() argument
440 struct symbol *sym = node->sym; in match_chain()
446 return cnode->ip - node->ip; in match_chain()
486 struct callchain_cursor_node *node; in split_add_child() local
492 node = callchain_cursor_current(cursor); in split_add_child()
504 if (match_chain(node, cnode) < 0) in split_add_child()
527 struct callchain_cursor_node *node; in append_chain_children() local
531 node = callchain_cursor_current(cursor); in append_chain_children()
532 if (!node) in append_chain_children()
579 struct callchain_cursor_node *node; in append_chain() local
581 node = callchain_cursor_current(cursor); in append_chain()
582 if (!node) in append_chain()
585 cmp = match_chain(node, cnode); in append_chain()
629 append_chain_children(&root->node, cursor, period); in callchain_append()
682 return merge_chain_branch(cursor, &dst->node, &src->node); in callchain_merge()
688 struct callchain_cursor_node *node = *cursor->last; in callchain_cursor_append() local
690 if (!node) { in callchain_cursor_append()
691 node = calloc(1, sizeof(*node)); in callchain_cursor_append()
692 if (!node) in callchain_cursor_append()
695 *cursor->last = node; in callchain_cursor_append()
698 node->ip = ip; in callchain_cursor_append()
699 node->map = map; in callchain_cursor_append()
700 node->sym = sym; in callchain_cursor_append()
704 cursor->last = &node->next; in callchain_cursor_append()
731 int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node, in fill_callchain_info() argument
734 al->map = node->map; in fill_callchain_info()
735 al->sym = node->sym; in fill_callchain_info()
736 if (node->map) in fill_callchain_info()
737 al->addr = node->map->map_ip(node->map, node->ip); in fill_callchain_info()
739 al->addr = node->ip; in fill_callchain_info()
802 static void free_callchain_node(struct callchain_node *node) in free_callchain_node() argument
808 list_for_each_entry_safe(list, tmp, &node->val, list) { in free_callchain_node()
813 n = rb_first(&node->rb_root_in); in free_callchain_node()
817 rb_erase(&child->rb_node_in, &node->rb_root_in); in free_callchain_node()
829 free_callchain_node(&root->node); in free_callchain()