src/hotspot/share/gc/g1/g1CollectedHeap.hpp
changeset 48961 120b61d50f85
parent 48950 f323537c9b75
child 48969 7eb296a8ce2c
equal deleted inserted replaced
48960:040293c73621 48961:120b61d50f85
  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