< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.hpp
Print this page
rev 54386 : 8221766: Load-reference barriers for Shenandoah
@@ -29,12 +29,12 @@
/**
* Provides safe handling of out-of-memory situations during evacuation.
*
* When a Java thread encounters out-of-memory while evacuating an object in a
- * write-barrier (i.e. it cannot copy the object to to-space), it does not necessarily
- * follow we can return immediately from the WB (and store to from-space).
+ * load-reference-barrier (i.e. it cannot copy the object to to-space), it does not
+ * necessarily follow we can return immediately from the LRB (and store to from-space).
*
* In very basic case, on such failure we may wait until the the evacuation is over,
* and then resolve the forwarded copy, and to the store there. This is possible
* because other threads might still have space in their GCLABs, and successfully
* evacuate the object.
@@ -62,21 +62,21 @@
* using a CAS. Depending on the result of the CAS:
* - success: carry on with evac
* - failure:
* - if offending value is a valid counter, then try again
* - if offending value is OOM-during-evac special value: loop until
- * counter drops to 0, then exit with read-barrier
+ * counter drops to 0, then exit with resolving the ptr
*
* Upon exit, exiting thread will decrease the counter using atomic dec.
*
* Upon OOM-during-evac, any thread will attempt to CAS OOM-during-evac
* special value into the counter. Depending on result:
- * - success: busy-loop until counter drops to zero, then exit with RB
+ * - success: busy-loop until counter drops to zero, then exit with resolve
* - failure:
* - offender is valid counter update: try again
* - offender is OOM-during-evac: busy loop until counter drops to
- * zero, then exit with RB
+ * zero, then exit with resolve
*/
class ShenandoahEvacOOMHandler {
private:
static const jint OOM_MARKER_MASK;
@@ -92,11 +92,11 @@
/**
* Attempt to enter the protected evacuation path.
*
* When this returns true, it is safe to continue with normal evacuation.
* When this method returns false, evacuation must not be entered, and caller
- * may safely continue with a read-barrier (if Java thread).
+ * may safely continue with a simple resolve (if Java thread).
*/
void enter_evacuation();
/**
* Leave evacuation path.
@@ -104,11 +104,11 @@
void leave_evacuation();
/**
* Signal out-of-memory during evacuation. It will prevent any other threads
* from entering the evacuation path, then wait until all threads have left the
- * evacuation path, and then return. It is then safe to continue with a read-barrier.
+ * evacuation path, and then return. It is then safe to continue with a simple resolve.
*/
void handle_out_of_memory_during_evacuation();
void clear();
};
< prev index next >