src/hotspot/share/gc/g1/g1StringDedupTable.cpp
changeset 49347 edb65305d3ac
parent 49041 44122f767467
child 49594 898ef81cbc0e
equal deleted inserted replaced
49346:14e84a4edb9c 49347:edb65305d3ac
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "classfile/altHashing.hpp"
    26 #include "classfile/altHashing.hpp"
    27 #include "classfile/javaClasses.inline.hpp"
    27 #include "classfile/javaClasses.inline.hpp"
       
    28 #include "gc/g1/g1BarrierSet.hpp"
    28 #include "gc/g1/g1CollectedHeap.inline.hpp"
    29 #include "gc/g1/g1CollectedHeap.inline.hpp"
    29 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
       
    30 #include "gc/g1/g1StringDedup.hpp"
    30 #include "gc/g1/g1StringDedup.hpp"
    31 #include "gc/g1/g1StringDedupTable.hpp"
    31 #include "gc/g1/g1StringDedupTable.hpp"
    32 #include "gc/shared/gcLocker.hpp"
    32 #include "gc/shared/gcLocker.hpp"
    33 #include "logging/log.hpp"
    33 #include "logging/log.hpp"
    34 #include "memory/padded.inline.hpp"
    34 #include "memory/padded.inline.hpp"
   381   stat.inc_new(size_in_bytes);
   381   stat.inc_new(size_in_bytes);
   382 
   382 
   383   if (existing_value != NULL) {
   383   if (existing_value != NULL) {
   384     // Enqueue the reference to make sure it is kept alive. Concurrent mark might
   384     // Enqueue the reference to make sure it is kept alive. Concurrent mark might
   385     // otherwise declare it dead if there are no other strong references to this object.
   385     // otherwise declare it dead if there are no other strong references to this object.
   386     G1SATBCardTableModRefBS::enqueue(existing_value);
   386     G1BarrierSet::enqueue(existing_value);
   387 
   387 
   388     // Existing value found, deduplicate string
   388     // Existing value found, deduplicate string
   389     java_lang_String::set_value(java_string, existing_value);
   389     java_lang_String::set_value(java_string, existing_value);
   390 
   390 
   391     if (G1CollectedHeap::heap()->is_in_young(value)) {
   391     if (G1CollectedHeap::heap()->is_in_young(value)) {