Lines Matching refs:vts

2107 static VTS* VTS__clone ( const HChar* who, VTS* vts );
2113 static VTS* VTS__subtract ( const HChar* who, VTS* vts, XArray* thridsToDel );
2116 static void VTS__delete ( VTS* vts );
2126 static void VTS__tick ( /*OUT*/VTS* out, Thr* me, VTS* vts );
2153 static void VTS__show ( const VTS* vts );
2156 static ULong VTS__indexAt_SLOW ( VTS* vts, Thr* idx );
2167 static Bool is_sane_VTS ( VTS* vts ) in is_sane_VTS() argument
2171 if (!vts) return False; in is_sane_VTS()
2172 if (vts->usedTS > vts->sizeTS) return False; in is_sane_VTS()
2173 n = vts->usedTS; in is_sane_VTS()
2175 st1 = &vts->ts[0]; in is_sane_VTS()
2182 st1 = &vts->ts[i]; in is_sane_VTS()
2183 st2 = &vts->ts[i+1]; in is_sane_VTS()
2198 VTS* vts = HG_(zalloc)(who, sizeof(VTS) + (sizeTS+1) * sizeof(ScalarTS)); in VTS__new() local
2199 tl_assert(vts->usedTS == 0); in VTS__new()
2200 vts->sizeTS = sizeTS; in VTS__new()
2201 *(ULong*)(&vts->ts[sizeTS]) = 0x0ddC0ffeeBadF00dULL; in VTS__new()
2202 return vts; in VTS__new()
2207 static VTS* VTS__clone ( const HChar* who, VTS* vts ) in VTS__clone() argument
2209 tl_assert(vts); in VTS__clone()
2210 tl_assert( *(ULong*)(&vts->ts[vts->sizeTS]) == 0x0ddC0ffeeBadF00dULL); in VTS__clone()
2211 UInt nTS = vts->usedTS; in VTS__clone()
2213 clone->id = vts->id; in VTS__clone()
2218 clone->ts[i] = vts->ts[i]; in VTS__clone()
2229 static VTS* VTS__subtract ( const HChar* who, VTS* vts, XArray* thridsToDel ) in VTS__subtract() argument
2232 tl_assert(vts); in VTS__subtract()
2234 tl_assert( *(ULong*)(&vts->ts[vts->sizeTS]) == 0x0ddC0ffeeBadF00dULL); in VTS__subtract()
2235 UInt nTS = vts->usedTS; in VTS__subtract()
2239 ThrID thrid = vts->ts[i].thrid; in VTS__subtract()
2248 ThrID thrid = vts->ts[i].thrid; in VTS__subtract()
2251 res->ts[j++] = vts->ts[i]; in VTS__subtract()
2263 static void VTS__delete ( VTS* vts ) in VTS__delete() argument
2265 tl_assert(vts); in VTS__delete()
2266 tl_assert(vts->usedTS <= vts->sizeTS); in VTS__delete()
2267 tl_assert( *(ULong*)(&vts->ts[vts->sizeTS]) == 0x0ddC0ffeeBadF00dULL); in VTS__delete()
2268 HG_(free)(vts); in VTS__delete()
2290 static void VTS__tick ( /*OUT*/VTS* out, Thr* me, VTS* vts ) in VTS__tick() argument
2300 if (vts->usedTS >= ThrID_MAX_VALID) in VTS__tick()
2302 tl_assert(out->sizeTS >= 1 + vts->usedTS); in VTS__tick()
2306 tl_assert(is_sane_VTS(vts)); in VTS__tick()
2307 n = vts->usedTS; in VTS__tick()
2311 ScalarTS* here = &vts->ts[i]; in VTS__tick()
2335 ScalarTS* here = &vts->ts[i]; in VTS__tick()
2353 ScalarTS* here2 = &vts->ts[i]; in VTS__tick()
2360 tl_assert(out->usedTS == vts->usedTS + (found ? 0 : 1)); in VTS__tick()
2619 static void VTS__show ( const VTS* vts ) in VTS__show() argument
2622 tl_assert(vts); in VTS__show()
2625 n = vts->usedTS; in VTS__show()
2627 const ScalarTS *st = &vts->ts[i]; in VTS__show()
2636 ULong VTS__indexAt_SLOW ( VTS* vts, Thr* idx ) in VTS__indexAt_SLOW() argument
2641 tl_assert(vts); in VTS__indexAt_SLOW()
2642 n = vts->usedTS; in VTS__indexAt_SLOW()
2644 ScalarTS* st = &vts->ts[i]; in VTS__indexAt_SLOW()
2763 VTS* vts; /* vts, in vts_set */ member
2798 tl_assert(ie->vts == NULL); in add_to_free_list()
2815 tl_assert(ie->vts == NULL); in get_from_free_list()
2830 te.vts = NULL; in get_new_VtsID()
2844 tl_assert(ie->vts); /* else it's not in use */ in VtsID__rcinc()
2846 tl_assert(ie->vts->id == ii); in VtsID__rcinc()
2856 tl_assert(ie->vts); /* else it's not in use */ in VtsID__rcdec()
2858 tl_assert(ie->vts->id == ii); in VtsID__rcdec()
2878 tl_assert(ie->vts == in_tab); in vts_tab__find__or__clone_and_add()
2883 ie->vts = in_tab; in vts_tab__find__or__clone_and_add()
2904 if (ie->vts) { in show_vts_stats()
2991 if (te->vts == NULL) { in vts_tab__do_GC()
2998 tl_assert(te->vts->id == i); in vts_tab__do_GC()
3001 &oldK, &oldV, (UWord)te->vts ); in vts_tab__do_GC()
3004 tl_assert(oldK == (UWord)te->vts); /* else what did delFromFM find?! */ in vts_tab__do_GC()
3006 VTS__delete(te->vts); in vts_tab__do_GC()
3007 te->vts = NULL; in vts_tab__do_GC()
3114 VTS* old_vts = old_te->vts; in vts_tab__do_GC()
3148 old_te->vts = NULL; in vts_tab__do_GC()
3175 new_te.vts = new_vts; in vts_tab__do_GC()
3290 tl_assert(te->vts == NULL); in vts_tab__do_GC()
3319 VTS* vts = (VTS*)wordK; in vts_tab__do_GC() local
3320 tl_assert(vts->id != VtsID_INVALID); in vts_tab__do_GC()
3321 VtsTE* te = VG_(indexXA)( vts_tab, vts->id ); in vts_tab__do_GC()
3322 tl_assert(te->vts == vts); in vts_tab__do_GC()
3331 tl_assert(te->vts); in vts_tab__do_GC()
3332 tl_assert(te->vts->id == i); in vts_tab__do_GC()
3419 tl_assert(te->vts); in VtsID__to_VTS()
3420 return te->vts; in VtsID__to_VTS()
3424 VTS* vts = VtsID__to_VTS(vi); in VtsID__pp() local
3425 VTS__show( vts ); in VtsID__pp()
3499 VTS* vts = VtsID__to_VTS(vi); in VtsID__tick() local
3501 VTS__tick(temp_max_sized_VTS, idx,vts); in VtsID__tick()
3507 VTS* vts = VtsID__to_VTS(vi); in VtsID__indexAt() local
3508 return VTS__indexAt_SLOW( vts, idx ); in VtsID__indexAt()