Lines Matching defs:new
167 * Create a child for a parent. If inherit_children, then the new child
168 * will become the new parent of it's parent children
173 struct callchain_node *new;
175 new = zalloc(sizeof(*new));
176 if (!new) {
180 new->parent = parent;
181 INIT_LIST_HEAD(&new->children);
182 INIT_LIST_HEAD(&new->val);
187 list_splice(&parent->children, &new->children);
190 chain_for_each_child(next, new)
191 next->parent = new;
193 list_add_tail(&new->siblings, &parent->children);
195 return new;
236 struct callchain_node *new;
238 new = create_child(parent, false);
239 fill_node(new, cursor);
241 new->children_hit = 0;
242 new->hit = period;
246 * Split the parent in two parts (a new child is created) and
248 * Then create another child to host the given callchain of new branch
256 struct callchain_node *new;
261 new = create_child(parent, true);
263 /* split the callchain and move a part to the new child */
266 new->val.next = &to_split->list;
267 new->val.prev = old_tail;
268 to_split->list.prev = &new->val;
269 old_tail->next = &new->val;
272 new->hit = parent->hit;
273 new->children_hit = parent->children_hit;
274 parent->children_hit = callchain_cumul_hits(new);
275 new->val_nr = parent->val_nr - idx_local;
278 /* create a new child for the new branch if any */
361 /* we match only a part of the node. Split it and add the new chain */