Lines Matching refs:cp
14 static void call_path__init(struct call_path *cp, struct call_path *parent,
17 cp->parent = parent;
18 cp->sym = sym;
19 cp->ip = sym ? 0 : ip;
20 cp->db_id = 0;
21 cp->in_kernel = in_kernel;
22 RB_CLEAR_NODE(&cp->rb_node);
23 cp->children = RB_ROOT;
55 struct call_path *cp;
70 cp = &cpb->cp[n];
72 call_path__init(cp, parent, sym, ip, in_kernel);
74 return cp;
83 struct call_path *cp;
95 cp = rb_entry(node_parent, struct call_path, rb_node);
97 if (cp->sym == sym && cp->ip == ip)
98 return cp;
100 if (sym < cp->sym || (sym == cp->sym && ip < cp->ip))
106 cp = call_path__new(cpr, parent, sym, ip, in_kernel);
107 if (!cp)
110 rb_link_node(&cp->rb_node, node_parent, p);
111 rb_insert_color(&cp->rb_node, &parent->children);
113 return cp;