--- a/hotspot/src/share/vm/gc/g1/g1RootClosures.cpp Fri Dec 04 04:06:37 2015 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1RootClosures.cpp Fri Dec 04 15:47:13 2015 +0100
@@ -23,7 +23,38 @@
*/
#include "precompiled.hpp"
-#include "gc/g1/g1RootClosures.inline.hpp"
+#include "gc/g1/g1OopClosures.inline.hpp"
+#include "gc/g1/g1RootClosures.hpp"
+#include "gc/g1/g1SharedClosures.hpp"
+
+// Closures used for standard G1 evacuation.
+class G1EvacuationClosures : public G1EvacuationRootClosures {
+ G1SharedClosures<G1MarkNone> _closures;
+
+public:
+ G1EvacuationClosures(G1CollectedHeap* g1h,
+ G1ParScanThreadState* pss,
+ bool gcs_are_young) :
+ _closures(g1h, pss, gcs_are_young, /* must_claim_cld */ false) {}
+
+ OopClosure* weak_oops() { return &_closures._buffered_oops; }
+ OopClosure* strong_oops() { return &_closures._buffered_oops; }
+
+ CLDClosure* weak_clds() { return &_closures._clds; }
+ CLDClosure* strong_clds() { return &_closures._clds; }
+ CLDClosure* thread_root_clds() { return NULL; }
+ CLDClosure* second_pass_weak_clds() { return NULL; }
+
+ CodeBlobClosure* strong_codeblobs() { return &_closures._codeblobs; }
+ CodeBlobClosure* weak_codeblobs() { return &_closures._codeblobs; }
+
+ void flush() { _closures._buffered_oops.done(); }
+ double closure_app_seconds() { return _closures._buffered_oops.closure_app_seconds(); }
+
+ OopClosure* raw_strong_oops() { return &_closures._oops; }
+
+ bool trace_metadata() { return false; }
+};
// Closures used during initial mark.
// The treatment of "weak" roots is selectable through the template parameter,