< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahStringDedup.inline.hpp

Print this page
@@ -44,14 +44,14 @@
    if (!is_string_candidate(obj)) {
      return false;
    }
  
    if (StringDedup::is_below_threshold_age(obj->age())) {
-     const markWord mark = obj->mark();
-     // Having/had displaced header, too risk to deal with them, skip
-     if (mark == markWord::INFLATING() || mark.has_displaced_mark_helper()) {
-       return false;
+     markWord mark = obj->mark();
+     // Fetch displaced header from monitor
+     if (mark.has_displaced_mark_helper()) {
+       mark = mark.displaced_mark_helper();
      }
  
      // Increase string age and enqueue it when it rearches age threshold
      markWord new_mark = mark.incr_age();
      if (mark == obj->cas_set_mark(new_mark, mark)) {
< prev index next >