/** Process any roots for which processing was delayed. */ @Inline public void processRoots() { logMessage(5, "processing delayed root objects"); while (!rootLocations.isEmpty()) { processRootEdge(rootLocations.pop()); } }
/** 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(); }