8221278: Shenandoah should not enqueue string dedup candidates during root scan
Reviewed-by: shade
--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp Thu Mar 21 14:18:34 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp Thu Mar 21 22:37:36 2019 +0100
@@ -48,7 +48,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
-template<UpdateRefsMode UPDATE_REFS, StringDedupMode STRING_DEDUP>
+template<UpdateRefsMode UPDATE_REFS>
class ShenandoahInitMarkRootsClosure : public OopClosure {
private:
ShenandoahObjToScanQueue* _queue;
@@ -57,7 +57,7 @@
template <class T>
inline void do_oop_work(T* p) {
- ShenandoahConcurrentMark::mark_through_ref<T, UPDATE_REFS, STRING_DEDUP>(p, _heap, _queue, _mark_context);
+ ShenandoahConcurrentMark::mark_through_ref<T, UPDATE_REFS, NO_DEDUP>(p, _heap, _queue, _mark_context);
}
public:
@@ -99,13 +99,8 @@
ShenandoahObjToScanQueue* q = queues->queue(worker_id);
- if (ShenandoahStringDedup::is_enabled()) {
- ShenandoahInitMarkRootsClosure<UPDATE_REFS, ENQUEUE_DEDUP> mark_cl(q);
- do_work(heap, &mark_cl, worker_id);
- } else {
- ShenandoahInitMarkRootsClosure<UPDATE_REFS, NO_DEDUP> mark_cl(q);
- do_work(heap, &mark_cl, worker_id);
- }
+ ShenandoahInitMarkRootsClosure<UPDATE_REFS> mark_cl(q);
+ do_work(heap, &mark_cl, worker_id);
}
private: