1188
1189 inline HeapWord* bottom_addr_for_region(uint index) const;
1190
1191 // Iterate over the heap regions in parallel. Assumes that this will be called
1192 // in parallel by ParallelGCThreads worker threads with distinct worker ids
1193 // in the range [0..max(ParallelGCThreads-1, 1)]. Applies "blk->doHeapRegion"
1194 // to each of the regions, by attempting to claim the region using the
1195 // HeapRegionClaimer and, if successful, applying the closure to the claimed
1196 // region. The concurrent argument should be set to true if iteration is
1197 // performed concurrently, during which no assumptions are made for consistent
1198 // attributes of the heap regions (as they might be modified while iterating).
1199 void heap_region_par_iterate(HeapRegionClosure* cl,
1200 uint worker_id,
1201 HeapRegionClaimer* hrclaimer,
1202 bool concurrent = false) const;
1203
1204 // Iterate over the regions (if any) in the current collection set.
1205 void collection_set_iterate(HeapRegionClosure* blk);
1206
1207 // Iterate over the regions (if any) in the current collection set. Starts the
1208 // iteration over the entire collection set so that a given worker id over the
1209 // set of 0..active_workers-1 are distributed across the set of collection set
1210 // regions.
1211 void collection_set_iterate_from(HeapRegionClosure *blk, uint worker_id, uint active_workers);
1212
1213 HeapRegion* next_compaction_region(const HeapRegion* from) const;
1214
1215 // Returns the HeapRegion that contains addr. addr must not be NULL.
1216 template <class T>
1217 inline HeapRegion* heap_region_containing(const T addr) const;
1218
1219 // A CollectedHeap is divided into a dense sequence of "blocks"; that is,
1220 // each address in the (reserved) heap is a member of exactly
1221 // one block. The defining characteristic of a block is that it is
1222 // possible to find its size, and thus to progress forward to the next
1223 // block. (Blocks may be of different sizes.) Thus, blocks may
1224 // represent Java objects, or they might be free blocks in a
1225 // free-list-based heap (or subheap), as long as the two kinds are
1226 // distinguishable and the size of each is determinable.
1227
1228 // Returns the address of the start of the "block" that contains the
1229 // address "addr". We say "blocks" instead of "object" since some heaps
1230 // may not pack objects densely; a chunk may either be an object or a
1231 // non-object.
|
1188
1189 inline HeapWord* bottom_addr_for_region(uint index) const;
1190
1191 // Iterate over the heap regions in parallel. Assumes that this will be called
1192 // in parallel by ParallelGCThreads worker threads with distinct worker ids
1193 // in the range [0..max(ParallelGCThreads-1, 1)]. Applies "blk->doHeapRegion"
1194 // to each of the regions, by attempting to claim the region using the
1195 // HeapRegionClaimer and, if successful, applying the closure to the claimed
1196 // region. The concurrent argument should be set to true if iteration is
1197 // performed concurrently, during which no assumptions are made for consistent
1198 // attributes of the heap regions (as they might be modified while iterating).
1199 void heap_region_par_iterate(HeapRegionClosure* cl,
1200 uint worker_id,
1201 HeapRegionClaimer* hrclaimer,
1202 bool concurrent = false) const;
1203
1204 // Iterate over the regions (if any) in the current collection set.
1205 void collection_set_iterate(HeapRegionClosure* blk);
1206
1207 // Iterate over the regions (if any) in the current collection set. Starts the
1208 // iteration over the entire collection set so that the start regions of a given
1209 // worker id over the set active_workers are evenly spread across the set of
1210 // collection set regions.
1211 void collection_set_iterate_from(HeapRegionClosure *blk, uint worker_id);
1212
1213 HeapRegion* next_compaction_region(const HeapRegion* from) const;
1214
1215 // Returns the HeapRegion that contains addr. addr must not be NULL.
1216 template <class T>
1217 inline HeapRegion* heap_region_containing(const T addr) const;
1218
1219 // A CollectedHeap is divided into a dense sequence of "blocks"; that is,
1220 // each address in the (reserved) heap is a member of exactly
1221 // one block. The defining characteristic of a block is that it is
1222 // possible to find its size, and thus to progress forward to the next
1223 // block. (Blocks may be of different sizes.) Thus, blocks may
1224 // represent Java objects, or they might be free blocks in a
1225 // free-list-based heap (or subheap), as long as the two kinds are
1226 // distinguishable and the size of each is determinable.
1227
1228 // Returns the address of the start of the "block" that contains the
1229 // address "addr". We say "blocks" instead of "object" since some heaps
1230 // may not pack objects densely; a chunk may either be an object or a
1231 // non-object.
|