Lines Matching refs:xpt
625 XPt* xpt = perm_malloc(sizeof(XPt)); in new_XPt() local
626 xpt->ip = ip; in new_XPt()
627 xpt->szB = 0; in new_XPt()
628 xpt->parent = parent; in new_XPt()
633 xpt->n_children = 0; in new_XPt()
634 xpt->max_children = 0; in new_XPt()
635 xpt->children = NULL; in new_XPt()
640 return xpt; in new_XPt()
681 static SXPt* dup_XTree(XPt* xpt, SizeT total_szB) in dup_XTree() argument
710 for (i = 0; i < xpt->n_children; i++) { in dup_XTree()
711 if (xpt->children[i]->szB >= sig_child_threshold_szB) { in dup_XTree()
715 n_insig_children = xpt->n_children - n_sig_children; in dup_XTree()
722 sxpt->szB = xpt->szB; in dup_XTree()
723 sxpt->Sig.ip = xpt->ip; in dup_XTree()
736 for (i = 0; i < xpt->n_children; i++) { in dup_XTree()
737 if (xpt->children[i]->szB >= sig_child_threshold_szB) { in dup_XTree()
738 sxpt->Sig.children[j++] = dup_XTree(xpt->children[i], total_szB); in dup_XTree()
739 sig_children_szB += xpt->children[i]->szB; in dup_XTree()
741 insig_children_szB += xpt->children[i]->szB; in dup_XTree()
792 static void sanity_check_XTree(XPt* xpt, XPt* parent) in sanity_check_XTree() argument
794 tl_assert(xpt != NULL); in sanity_check_XTree()
797 tl_assert2(xpt->parent == parent, in sanity_check_XTree()
798 "xpt->parent = %p, parent = %p\n", xpt->parent, parent); in sanity_check_XTree()
801 tl_assert(xpt->n_children <= xpt->max_children); in sanity_check_XTree()
939 XPt* xpt = alloc_xpt; in get_XCon() local
959 if (ch == xpt->n_children) { in get_XCon()
962 XPt* new_child_xpt = new_XPt(ip, xpt); in get_XCon()
963 add_child_xpt(xpt, new_child_xpt); in get_XCon()
964 xpt = new_child_xpt; in get_XCon()
967 } else if (ip == xpt->children[ch]->ip) { in get_XCon()
969 xpt = xpt->children[ch]; in get_XCon()
998 if (0 != xpt->n_children) { in get_XCon()
1013 return xpt; in get_XCon()
1017 static void update_XCon(XPt* xpt, SSizeT space_delta) in update_XCon() argument
1020 tl_assert(NULL != xpt); in update_XCon()
1025 while (xpt != alloc_xpt) { in update_XCon()
1026 if (space_delta < 0) tl_assert(xpt->szB >= -space_delta); in update_XCon()
1027 xpt->szB += space_delta; in update_XCon()
1028 xpt = xpt->parent; in update_XCon()