Home | History | Annotate | Download | only in helgrind

Lines Matching full:thrid

144    We pack it into 64 bits by representing the Thr* using a ThrID, a
158 32 since a ThrID is a UInt. 27 comes from the fact that
160 in tsw not only a ThrID but also minimum 4+1 other bits (access size
163 NB2: thrid values are issued upwards from 1024, and values less
173 Thr's to thrid values (set up in Thr__new) persists forever.
186 ThrID == 0 to denote an empty Thr_n_RCEC record. So ThrID == 0
187 must never be a valid ThrID. Given NB2 that's OK.
195 ThrID thrid : SCALARTS_N_THRBITS;
307 ThrID thrid : SCALARTS_N_THRBITS;
2001 static ThrID Thr__to_ThrID ( Thr* thr ); /* fwds */
2002 static Thr* Thr__from_ThrID ( ThrID thrid ); /* fwds */
2031 /* The dead thread (ThrID, actually) tables. A thread may only be
2034 the ThrID values must be unique.
2037 Once pruning is done, these ThrID are added in verydead_thread_table.
2042 static XArray* /* of ThrID */ verydead_thread_table_not_pruned = NULL;
2043 static XArray* /* of ThrID */ verydead_thread_table = NULL;
2047 ThrID id1 = *(const ThrID*)v1;
2048 ThrID id2 = *(const ThrID*)v2;
2061 HG_(free), sizeof(ThrID) );
2066 HG_(free), sizeof(ThrID) );
2078 ThrID thrid1, thrid2;
2079 thrid2 = *(ThrID*)VG_(indexXA)( thrids, 0 );
2082 thrid2 = *(ThrID*)VG_(indexXA)( thrids, i );
2138 Returns zero iff LEQ(A,B), or a valid ThrID if not (zero is an
2139 invald ThrID). In the latter case, the returned ThrID indicates
2184 if (st1->thrid >= st2->thrid)
2239 ThrID thrid = vts->ts[i].thrid;
2240 if (VG_(lookupXA)(thridsToDel, &thrid, NULL, NULL))
2248 ThrID thrid = vts->ts[i].thrid;
2249 if (VG_(lookupXA)(thridsToDel, &thrid, NULL, NULL))
2282 out->ts[hi].thrid = Thr__to_ThrID(thr);
2293 ThrID me_thrid;
2312 if (UNLIKELY(here->thrid >= me_thrid))
2322 (b) there is a next entry, and its thrid > me_thrid:
2324 (c) there is a next entry, and its thrid == me_thrid:
2331 out->ts[hi].thrid = me_thrid;
2336 if (me_thrid == here->thrid) { /* case (c) */
2342 out->ts[hi].thrid = here->thrid;
2348 out->ts[hi].thrid = me_thrid;
2372 ThrID thrid;
2394 /* This logic is to enumerate triples (thrid, tyma, tymb) drawn
2395 from a and b in order, where thrid is the next ThrID
2408 thrid = tmpb->thrid;
2416 thrid = tmpa->thrid;
2422 /* both not empty; extract lowest-ThrID'd triple */
2425 if (tmpa->thrid < tmpb->thrid) {
2426 /* a has the lowest unconsidered ThrID */
2427 thrid = tmpa->thrid;
2431 } else if (tmpa->thrid > tmpb->thrid) {
2432 /* b has the lowest unconsidered ThrID */
2433 thrid = tmpb->thrid;
2438 /* they both next mention the same ThrID */
2439 tl_assert(tmpa->thrid == tmpb->thrid);
2440 thrid = tmpa->thrid; /* == tmpb->thrid */
2454 out->ts[hi].thrid = thrid;
2467 they are, or the first ThrID for which they are not (no valid ThrID
2471 static UInt/*ThrID*/ VTS__cmpLEQ ( VTS* a, VTS* b )
2490 ThrID thrid;
2504 thrid = tmpb->thrid;
2511 thrid = tmpa->thrid;
2516 /* both not empty; extract lowest-ThrID'd triple */
2519 if (tmpa->thrid < tmpb->thrid) {
2520 /* a has the lowest unconsidered ThrID */
2522 thrid = tmpa->thrid;
2527 if (tmpa->thrid > tmpb->thrid) {
2528 /* b has the lowest unconsidered ThrID */
2531 thrid = tmpb->thrid;
2534 /* they both next mention the same ThrID */
2535 tl_assert(tmpa->thrid == tmpb->thrid);
2537 thrid = tmpa->thrid;
2549 tl_assert(thrid >= 1024);
2550 return thrid;
2554 return 0; /* all points are LEQ => return an invalid ThrID */
2590 && tmpa->thrid == tmpb->thrid))
2602 if (tmpa->thrid < tmpb->thrid) return -1;
2603 if (tmpa->thrid > tmpb->thrid) return 1;
2628 VG_(printf)(i < n-1 ? "%d:%llu " : "%d:%llu", st->thrid, (ULong)st->tym);
2639 ThrID idx_thrid = Thr__to_ThrID(idx);
2645 if (st->thrid == idx_thrid)
2661 ThrID nyu;
3196 ThrID thrid =
3197 *(ThrID*)VG_(indexXA)( verydead_thread_table_not_pruned, i );
3198 VG_(addToXA)( verydead_thread_table, &thrid );
3520 ThrID diffthrid;
4003 /* Maps ThrID values to their Thr*s (which contain ThrID values that
4005 numbered slot (0) is for thrid = 1024, (1) is for 1025, etc. */
4008 /* And a counter to dole out ThrID values. For rationale/background,
4010 static ThrID thrid_counter = 1024; /* runs up to ThrID_MAX_VALID */
4012 static ThrID Thr__to_ThrID ( Thr* thr ) {
4013 return thr->thrid;
4015 static Thr* Thr__from_ThrID ( UInt thrid ) {
4016 Thr* thr = *(Thr**)VG_(indexXA)( thrid_to_thr_map, thrid - 1024 );
4017 tl_assert(thr->thrid == thrid);
4035 /* Add this Thr* <-> ThrID binding to the mapping, and
4047 thr->thrid = thrid_counter++;
4049 tl_assert(ix + 1024 == thr->thrid);
4444 UInt thrid : SCALARTS_N_THRBITS;
4589 ThrID thrid = thr->thrid;
4590 tl_assert(thrid != 0); /* zero is used to denote an empty slot. */
4603 example.acc.tsw = (TSW) {.thrid = thrid,
4609 /* We already have a record for this address and this (thrid, R/W,
4622 tl_assert(ref->acc.tsw.thrid == thrid);
4635 ref->acc.tsw = (TSW) {.thrid = thrid,
4673 ThrID thrid = thr->thrid;
4699 if (cand_ref->acc.tsw.thrid == thrid)
4731 tl_assert(ref->acc.tsw.thrid);
4742 *resThr = Thr__from_ThrID(ref->acc.tsw.thrid);
4775 Thr__from_ThrID(ref->acc.tsw.thrid),
4826 mru.acc = (Thr_n_RCEC) {.tsw = {.thrid = 0,
4863 tl_assert (oldref->acc.tsw.thrid);