The proposal is to change the following in the StringTable:
-#if INCLUDE_G1GC
- if (G1StringDedup::is_enabled()) {
- // Deduplicate the string before it is interned. Note that we should never
- // deduplicate a string after it has been interned. Doing so will counteract
- // compiler optimizations done on e.g. interned string literals.
- G1StringDedup::deduplicate(string());
- }
-#endif
+ Universe::heap()->deduplicate_string(string());
-#if INCLUDE_G1GC
- if (G1StringDedup::is_enabled()) {
- // Deduplicate the string before it is interned. Note that we should never
- // deduplicate a string after it has been interned. Doing so will counteract
- // compiler optimizations done on e.g. interned string literals.
- G1StringDedup::deduplicate(string());
- }
-#endif
+ Universe::heap()->deduplicate_string(string());