src/hotspot/share/gc/serial/markSweep.cpp
changeset 47885 5caa1d5f74c1
parent 47216 71c04702a3d5
child 47897 eb3696e0c6d8
equal deleted inserted replaced
47884:3cfab71d6c81 47885:5caa1d5f74c1
    63 MarkAndPushClosure            MarkSweep::mark_and_push_closure;
    63 MarkAndPushClosure            MarkSweep::mark_and_push_closure;
    64 CLDToOopClosure               MarkSweep::follow_cld_closure(&mark_and_push_closure);
    64 CLDToOopClosure               MarkSweep::follow_cld_closure(&mark_and_push_closure);
    65 CLDToOopClosure               MarkSweep::adjust_cld_closure(&adjust_pointer_closure);
    65 CLDToOopClosure               MarkSweep::adjust_cld_closure(&adjust_pointer_closure);
    66 
    66 
    67 inline void MarkSweep::mark_object(oop obj) {
    67 inline void MarkSweep::mark_object(oop obj) {
    68 #if INCLUDE_ALL_GCS
       
    69   if (G1StringDedup::is_enabled()) {
       
    70     // We must enqueue the object before it is marked
       
    71     // as we otherwise can't read the object's age.
       
    72     G1StringDedup::enqueue_from_mark(obj);
       
    73   }
       
    74 #endif
       
    75   // some marks may contain information we need to preserve so we store them away
    68   // some marks may contain information we need to preserve so we store them away
    76   // and overwrite the mark.  We'll restore it at the end of markSweep.
    69   // and overwrite the mark.  We'll restore it at the end of markSweep.
    77   markOop mark = obj->mark();
    70   markOop mark = obj->mark();
    78   obj->set_mark(markOopDesc::prototype()->set_marked());
    71   obj->set_mark(markOopDesc::prototype()->set_marked());
    79 
    72