< prev index next >

src/share/vm/gc/g1/g1CollectedHeap.hpp

Print this page




1275   // This permission only extends from the creation of a new object
1276   // via a TLAB up to the first subsequent safepoint. If such permission
1277   // is granted for this heap type, the compiler promises to call
1278   // defer_store_barrier() below on any slow path allocation of
1279   // a new object for which such initializing store barriers will
1280   // have been elided. G1, like CMS, allows this, but should be
1281   // ready to provide a compensating write barrier as necessary
1282   // if that storage came out of a non-young region. The efficiency
1283   // of this implementation depends crucially on being able to
1284   // answer very efficiently in constant time whether a piece of
1285   // storage in the heap comes from a young region or not.
1286   // See ReduceInitialCardMarks.
1287   virtual bool can_elide_tlab_store_barriers() const {
1288     return true;
1289   }
1290 
1291   virtual bool card_mark_must_follow_store() const {
1292     return true;
1293   }
1294 






1295   inline bool is_in_young(const oop obj);
1296 
1297   virtual bool is_scavengable(const void* addr);
1298 
1299   // We don't need barriers for initializing stores to objects
1300   // in the young gen: for the SATB pre-barrier, there is no
1301   // pre-value that needs to be remembered; for the remembered-set
1302   // update logging post-barrier, we don't maintain remembered set
1303   // information for young gen objects.
1304   virtual inline bool can_elide_initializing_store_barrier(oop new_obj);
1305 
1306   // Returns "true" iff the given word_size is "very large".
1307   static bool is_humongous(size_t word_size) {
1308     // Note this has to be strictly greater-than as the TLABs
1309     // are capped at the humongous threshold and we want to
1310     // ensure that we don't try to allocate a TLAB as
1311     // humongous and that we don't allocate a humongous
1312     // object in a TLAB.
1313     return word_size > _humongous_object_threshold_in_words;
1314   }




1275   // This permission only extends from the creation of a new object
1276   // via a TLAB up to the first subsequent safepoint. If such permission
1277   // is granted for this heap type, the compiler promises to call
1278   // defer_store_barrier() below on any slow path allocation of
1279   // a new object for which such initializing store barriers will
1280   // have been elided. G1, like CMS, allows this, but should be
1281   // ready to provide a compensating write barrier as necessary
1282   // if that storage came out of a non-young region. The efficiency
1283   // of this implementation depends crucially on being able to
1284   // answer very efficiently in constant time whether a piece of
1285   // storage in the heap comes from a young region or not.
1286   // See ReduceInitialCardMarks.
1287   virtual bool can_elide_tlab_store_barriers() const {
1288     return true;
1289   }
1290 
1291   virtual bool card_mark_must_follow_store() const {
1292     return true;
1293   }
1294 
1295   // The reference pending list lock is acquired from from the
1296   // ConcurrentMarkThread.
1297   virtual bool needs_reference_pending_list_locker_thread() const {
1298     return true;
1299   }
1300 
1301   inline bool is_in_young(const oop obj);
1302 
1303   virtual bool is_scavengable(const void* addr);
1304 
1305   // We don't need barriers for initializing stores to objects
1306   // in the young gen: for the SATB pre-barrier, there is no
1307   // pre-value that needs to be remembered; for the remembered-set
1308   // update logging post-barrier, we don't maintain remembered set
1309   // information for young gen objects.
1310   virtual inline bool can_elide_initializing_store_barrier(oop new_obj);
1311 
1312   // Returns "true" iff the given word_size is "very large".
1313   static bool is_humongous(size_t word_size) {
1314     // Note this has to be strictly greater-than as the TLABs
1315     // are capped at the humongous threshold and we want to
1316     // ensure that we don't try to allocate a TLAB as
1317     // humongous and that we don't allocate a humongous
1318     // object in a TLAB.
1319     return word_size > _humongous_object_threshold_in_words;
1320   }


< prev index next >