src/share/vm/gc_interface/collectedHeap.hpp

changeset 1462
39b01ab7035a
parent 1428
54b3b351d6f9
child 1600
2dd52dea6d28
     1.1 --- a/src/share/vm/gc_interface/collectedHeap.hpp	Wed Oct 07 19:01:55 2009 -0400
     1.2 +++ b/src/share/vm/gc_interface/collectedHeap.hpp	Fri Oct 16 02:05:46 2009 -0700
     1.3 @@ -415,9 +415,14 @@
     1.4      guarantee(false, "thread-local allocation buffers not supported");
     1.5      return 0;
     1.6    }
     1.7 +
     1.8    // Can a compiler initialize a new object without store barriers?
     1.9    // This permission only extends from the creation of a new object
    1.10 -  // via a TLAB up to the first subsequent safepoint.
    1.11 +  // via a TLAB up to the first subsequent safepoint. If such permission
    1.12 +  // is granted for this heap type, the compiler promises to call
    1.13 +  // defer_store_barrier() below on any slow path allocation of
    1.14 +  // a new object for which such initializing store barriers will
    1.15 +  // have been elided.
    1.16    virtual bool can_elide_tlab_store_barriers() const = 0;
    1.17  
    1.18    // If a compiler is eliding store barriers for TLAB-allocated objects,
    1.19 @@ -425,8 +430,19 @@
    1.20    // an object allocated anywhere.  The compiler's runtime support
    1.21    // promises to call this function on such a slow-path-allocated
    1.22    // object before performing initializations that have elided
    1.23 -  // store barriers.  Returns new_obj, or maybe a safer copy thereof.
    1.24 -  virtual oop new_store_barrier(oop new_obj);
    1.25 +  // store barriers. Returns new_obj, or maybe a safer copy thereof.
    1.26 +  virtual oop defer_store_barrier(JavaThread* thread, oop new_obj);
    1.27 +
    1.28 +  // Answers whether an initializing store to a new object currently
    1.29 +  // allocated at the given address doesn't need a (deferred) store
    1.30 +  // barrier. Returns "true" if it doesn't need an initializing
    1.31 +  // store barrier; answers "false" if it does.
    1.32 +  virtual bool can_elide_initializing_store_barrier(oop new_obj) = 0;
    1.33 +
    1.34 +  // If the CollectedHeap was asked to defer a store barrier above,
    1.35 +  // this informs it to flush such a deferred store barrier to the
    1.36 +  // remembered set.
    1.37 +  virtual void flush_deferred_store_barrier(JavaThread* thread);
    1.38  
    1.39    // Can a compiler elide a store barrier when it writes
    1.40    // a permanent oop into the heap?  Applies when the compiler

mercurial