--- old/src/hotspot/share/gc/shared/weakProcessor.hpp 2017-10-17 22:53:13.803305010 +0200 +++ new/src/hotspot/share/gc/shared/weakProcessor.hpp 2017-10-17 22:53:13.543296606 +0200 @@ -30,11 +30,19 @@ // Helper class to aid in root scanning and cleaning of weak oops in the VM. // -// New sets of weak oops added to this class will automatically +// New contains of weak oops added to this class will automatically // be cleaned by all GCs, including the young generation GCs. class WeakProcessor : AllStatic { public: - static void unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete = NULL); + // Visit all oop*s and either apply the keep_alive closure if the referenced + // object is considered alive by the is_alive closure, otherwise do some + // container specific cleanup of element holding the oop. + // + // The complete closure is used as a post-processing step called + // after each container has been processed. + static void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete = NULL); + + // Visit all oop*s and apply the given clousre. static void oops_do(OopClosure* closure); };