Lines Matching refs:children
79 // keeping XPt children sorted by 'ip' and use binary search in get_XCon.
551 // Children.
555 UInt n_children; // number of children
556 UInt max_children; // capacity of children array
557 XPt** children; // pointers to children XPts
577 SXPt** children;
619 // Note that we cannot use perm_malloc for the 'children' array, because
626 // We don't initially allocate any space for children. We let that
628 // children anyway.
631 xpt->children = NULL;
641 // Expand 'children' if necessary.
646 parent->children = VG_(malloc)( "ms.main.acx.1",
651 parent->children = VG_(realloc)( "ms.main.acx.2",
652 parent->children,
658 // Insert new child XPt in parent's children list.
659 parent->children[ parent->n_children++ ] = child;
683 // Number of XPt children Action for SXPT
685 // 0 sig, 0 insig alloc 0 children
686 // N sig, 0 insig alloc N children, dup all
704 // How many children are significant? And do we need an aggregate SXPt?
707 if (xpt->children[i]->szB >= sig_child_threshold_szB) {
722 // Create the SXPt's children.
726 sxpt->Sig.children = VG_(malloc)("ms.main.dX.2",
729 // Duplicate the significant children. (Nb: sig_children_szB +
733 if (xpt->children[i]->szB >= sig_child_threshold_szB) {
734 sxpt->Sig.children[j++] = dup_XTree(xpt->children[i], total_szB);
735 sig_children_szB += xpt->children[i]->szB;
737 insig_children_szB += xpt->children[i]->szB;
741 // Create the SXPt for the insignificant children, if any, and put it
751 sxpt->Sig.children[n_sig_children] = insig_sxpt;
754 sxpt->Sig.children = NULL;
767 // Free all children SXPts, then the children array.
769 free_SXTree(sxpt->Sig.children[i]);
770 sxpt->Sig.children[i] = NULL;
772 VG_(free)(sxpt->Sig.children); sxpt->Sig.children = NULL;
796 // Check children counts look sane.
800 // children's sizes. See comment at the bottom of get_XCon.
812 // Check the sum of any children szBs equals the SXPt's szB. Check the
813 // children at the same time.
818 sanity_check_SXTree(sxpt->Sig.children[i]);
950 // Look for IP in xpt's children.
956 // IP not found in the children.
963 } else if (ip == xpt->children[ch]->ip) {
964 // Found the IP in the children, stop.
965 xpt = xpt->children[ch];
976 // size would always be equal to the sum of its children's sizes, which
982 // nor can we do sanity check an XPt's size against its children's sizes.
2191 // below it by pretending it has no children.
2246 // Sort SXPt's children by szB (reverse order: biggest to smallest).
2252 VG_(ssort)(sxpt->Sig.children, sxpt->Sig.n_children, sizeof(SXPt*),
2255 // Print the SXPt's children. They should already be in sorted order.
2258 child = sxpt->Sig.children[i];
2274 // There should be 0 or 1 Insig children SXPts.