1195 virtual void safe_object_iterate(ObjectClosure* cl) { |
1195 virtual void safe_object_iterate(ObjectClosure* cl) { |
1196 object_iterate(cl); |
1196 object_iterate(cl); |
1197 } |
1197 } |
1198 |
1198 |
1199 // Iterate over heap regions, in address order, terminating the |
1199 // Iterate over heap regions, in address order, terminating the |
1200 // iteration early if the "doHeapRegion" method returns "true". |
1200 // iteration early if the "do_heap_region" method returns "true". |
1201 void heap_region_iterate(HeapRegionClosure* blk) const; |
1201 void heap_region_iterate(HeapRegionClosure* blk) const; |
1202 |
1202 |
1203 // Return the region with the given index. It assumes the index is valid. |
1203 // Return the region with the given index. It assumes the index is valid. |
1204 inline HeapRegion* region_at(uint index) const; |
1204 inline HeapRegion* region_at(uint index) const; |
1205 |
1205 |
1270 size_t tlab_capacity(Thread* ignored) const; |
1270 size_t tlab_capacity(Thread* ignored) const; |
1271 size_t tlab_used(Thread* ignored) const; |
1271 size_t tlab_used(Thread* ignored) const; |
1272 size_t max_tlab_size() const; |
1272 size_t max_tlab_size() const; |
1273 size_t unsafe_max_tlab_alloc(Thread* ignored) const; |
1273 size_t unsafe_max_tlab_alloc(Thread* ignored) const; |
1274 |
1274 |
1275 // Can a compiler initialize a new object without store barriers? |
|
1276 // This permission only extends from the creation of a new object |
|
1277 // via a TLAB up to the first subsequent safepoint. If such permission |
|
1278 // is granted for this heap type, the compiler promises to call |
|
1279 // defer_store_barrier() below on any slow path allocation of |
|
1280 // a new object for which such initializing store barriers will |
|
1281 // have been elided. G1, like CMS, allows this, but should be |
|
1282 // ready to provide a compensating write barrier as necessary |
|
1283 // if that storage came out of a non-young region. The efficiency |
|
1284 // of this implementation depends crucially on being able to |
|
1285 // answer very efficiently in constant time whether a piece of |
|
1286 // storage in the heap comes from a young region or not. |
|
1287 // See ReduceInitialCardMarks. |
|
1288 virtual bool can_elide_tlab_store_barriers() const { |
|
1289 return true; |
|
1290 } |
|
1291 |
|
1292 virtual bool card_mark_must_follow_store() const { |
|
1293 return true; |
|
1294 } |
|
1295 |
|
1296 inline bool is_in_young(const oop obj); |
1275 inline bool is_in_young(const oop obj); |
1297 |
|
1298 // We don't need barriers for initializing stores to objects |
|
1299 // in the young gen: for the SATB pre-barrier, there is no |
|
1300 // pre-value that needs to be remembered; for the remembered-set |
|
1301 // update logging post-barrier, we don't maintain remembered set |
|
1302 // information for young gen objects. |
|
1303 virtual inline bool can_elide_initializing_store_barrier(oop new_obj); |
|
1304 |
1276 |
1305 // Returns "true" iff the given word_size is "very large". |
1277 // Returns "true" iff the given word_size is "very large". |
1306 static bool is_humongous(size_t word_size) { |
1278 static bool is_humongous(size_t word_size) { |
1307 // Note this has to be strictly greater-than as the TLABs |
1279 // Note this has to be strictly greater-than as the TLABs |
1308 // are capped at the humongous threshold and we want to |
1280 // are capped at the humongous threshold and we want to |