Lines Matching defs:sectors

56 /* Nr of sectors provided via command line parameter. */
58 /* Nr of sectors.
374 /* The root data structure is an array of sectors. The index of the
386 static Sector sectors[MAX_N_SECTORS];
480 Sector* s = &sectors[sNo];
689 hx->start, hx->len, (int)(sec - sectors), \
724 return False; /* run out of sectors to search */
726 const Sector* sec = &sectors[sno];
774 break; /* run out of sectors to search */
775 if ((const UChar*)hcode >= (const UChar*)sectors[sno].tc
776 && (const UChar*)hcode <= (const UChar*)sectors[sno].tc_next
809 vg_assert( (UChar*)host_code >= (UChar*)sectors[to_sNo].tc );
810 vg_assert( (UChar*)host_code <= (UChar*)sectors[to_sNo].tc_next
1293 /* Check that the number of listed sectors equals the number
1296 if (sectors[i].tc != NULL)
1313 sec = &sectors[sno];
1408 i = sectors[sNo].empty_tt_list;
1409 sectors[sNo].empty_tt_list = sectors[sNo].tt[i].usage.next_empty_tte;
1418 sectors[sNo].tt[tteno].usage.next_empty_tte = sectors[sNo].empty_tt_list;
1419 sectors[sNo].empty_tt_list = tteno;
1432 sec = &sectors[sno];
1632 if (sectors[y].tc == NULL)
1639 tcAvailQ = ((ULong*)(&sectors[y].tc[tc_sector_szQ]))
1640 - ((ULong*)(sectors[y].tc_next));
1645 || sectors[y].tt_n_inuse >= N_TTES_PER_SECTOR) {
1651 Int tt_loading_pct = (100 * sectors[y].tt_n_inuse)
1660 8 * (tc_sector_szQ - tcAvailQ)/sectors[y].tt_n_inuse);
1670 tcAvailQ = ((ULong*)(&sectors[y].tc[tc_sector_szQ]))
1671 - ((ULong*)(sectors[y].tc_next));
1675 vg_assert(sectors[y].tt_n_inuse < N_TTES_PER_SECTOR);
1676 vg_assert(sectors[y].tt_n_inuse >= 0);
1679 tcptr = sectors[y].tc_next;
1680 vg_assert(tcptr >= &sectors[y].tc[0]);
1681 vg_assert(tcptr <= &sectors[y].tc[tc_sector_szQ]);
1686 sectors[y].tc_next += reqdQ;
1687 sectors[y].tt_n_inuse++;
1690 tcptr2 = sectors[y].tc_next;
1691 vg_assert(tcptr2 >= &sectors[y].tc[0]);
1692 vg_assert(tcptr2 <= &sectors[y].tc[tc_sector_szQ]);
1697 TTEntry__init(&sectors[y].tt[tteix]);
1698 sectors[y].tt[tteix].status = InUse;
1699 sectors[y].tt[tteix].tcptr = tcptr;
1700 sectors[y].tt[tteix].usage.prof.count = 0;
1701 sectors[y].tt[tteix].usage.prof.weight =
1703 sectors[y].tt[tteix].vge = *vge;
1704 sectors[y].tt[tteix].entry = entry;
1710 if (sectors[y].htt[htti] == HTT_EMPTY
1711 || sectors[y].htt[htti] == HTT_DELETED)
1717 sectors[y].htt[htti] = tteix;
1730 &sectors[y].tt[tteix].usage.prof.count );
1743 XArray* hx_array = sectors[y].host_extents;
1760 upd_eclasses_after_add( &sectors[y], tteix );
1780 all sectors and avoids multiple expensive % operations. */
1785 /* Search in all the sectors,using sector_search_order[] as a
1786 heuristic guide as to what order to visit the sectors. */
1791 return False; /* run out of sectors to search */
1796 tti = sectors[sno].htt[k];
1798 && sectors[sno].tt[tti].entry == guest_addr) {
1802 guest_addr, sectors[sno].tt[tti].tcptr );
1804 *res_hcode = (Addr)sectors[sno].tt[tti].tcptr;
1820 if (sectors[sno].htt[k] == HTT_EMPTY)
1885 vg_assert(sec == &sectors[secNo]);
2071 sec = &sectors[sno];
2092 sec = &sectors[sno];
2118 sec = &sectors[sno];
2356 /* Initialise the sectors, even the ones we aren't going to use.
2360 VG_(memset)(&sectors[i], 0, sizeof(sectors[i]));
2383 "TT/TC: cache: %d sectors of %d bytes each = %d total TC\n",
2438 "(sectors recycled %'llu)\n",
2447 VG_(printf)(" %4d", sectors[0].ec2tte_used[e]);
2482 if (sectors[sno].tc == NULL)
2485 if (sectors[sno].tt[i].status != InUse)
2487 score_total += score(&sectors[sno].tt[i]);
2488 /* Find the rank for sectors[sno].tt[i]. */
2497 if ( score(&sectors[sno].tt[i]) > tops[r].score ) {
2510 tops[r].addr = sectors[sno].tt[i].entry;
2511 tops[r].score = score( &sectors[sno].tt[i] );
2520 if (sectors[sno].tc == NULL)
2523 if (sectors[sno].tt[i].status != InUse)
2525 sectors[sno].tt[i].usage.prof.count = 0;