コード例 #1
0
ファイル: TraceLocal.java プロジェクト: rmcilroy/HeraJVM
 /**
  * Process GC work until either complete or workLimit units of work are completed.
  *
  * @param workLimit The maximum units of work to perform.
  * @return True if all work was completed within workLimit.
  */
 @Inline
 public boolean incrementalTrace(int workLimit) {
   logMessage(4, "Continuing GC in parallel (incremental)");
   logMessage(5, "processing gray objects");
   int units = 0;
   do {
     while (!values.isEmpty() && units < workLimit) {
       ObjectReference v = values.pop();
       scanObject(v);
       units++;
     }
   } while (!values.isEmpty() && units < workLimit);
   return values.isEmpty();
 }
コード例 #2
0
ファイル: TraceLocal.java プロジェクト: rmcilroy/HeraJVM
 /** Finishing processing all GC work. This method iterates until all work queues are empty. */
 @Inline
 public void completeTrace() {
   logMessage(4, "Processing GC in parallel");
   if (!rootLocations.isEmpty()) {
     processRoots();
   }
   logMessage(5, "processing gray objects");
   assertMutatorRemsetsFlushed();
   do {
     while (!values.isEmpty()) {
       ObjectReference v = values.pop();
       scanObject(v);
     }
     processRememberedSets();
   } while (!values.isEmpty());
   assertMutatorRemsetsFlushed();
 }
コード例 #3
0
 /**
  * Pushes an object onto the queue, forcing an out of line sequence.
  *
  * @param object The object to push.
  */
 @Inline
 public final void pushOOL(ObjectReference object) {
   values.pushOOL(object);
 }
コード例 #4
0
 /** Return true if this buffer is locally empty */
 public final boolean isFlushed() {
   return values.isFlushed();
 }
コード例 #5
0
 /** Flushes all local state back to the shared queue. */
 public final void flushLocal() {
   values.flushLocal();
 }
コード例 #6
0
 @Inline
 public final boolean isEmpty() {
   return values.isEmpty();
 }
コード例 #7
0
 /**
  * Retrives an object.
  *
  * @return The object retrieved.
  */
 @Inline
 public final ObjectReference pop() {
   return values.pop();
 }
コード例 #8
0
ファイル: TraceLocal.java プロジェクト: rmcilroy/HeraJVM
 public void release() {
   values.reset();
   rootLocations.reset();
 }
コード例 #9
0
ファイル: TraceLocal.java プロジェクト: rmcilroy/HeraJVM
 /** Flush the local buffers of all deques. */
 public final void flush() {
   values.flushLocal();
   rootLocations.flushLocal();
 }
コード例 #10
0
ファイル: TraceLocal.java プロジェクト: rmcilroy/HeraJVM
 /**
  * Add a gray object
  *
  * @param object The object to be enqueued
  */
 @Inline
 public final void processNode(ObjectReference object) {
   values.push(object);
 }