RFR: 8202647: Add deduplicate_string function to CollectedHeap

Stefan Johansson stefan.johansson at oracle.com
Mon May 7 13:27:39 UTC 2018


Hi Stefan,

On 2018-05-07 15:12, Stefan Karlsson wrote:
> And here is the webrev:
> http://cr.openjdk.java.net/~stefank/8202647/webrev.01/
Looks good, thanks for cleaning this up,
StefanJ

> 
> StefanK
> 
> On 2018-05-07 15:08, Stefan Karlsson wrote:
>> Hi all,
>>
>> Please review this patch to add a CollectedHeap::deduplicate_string 
>> virtual function.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8202647
>>
>> Today we have this G1 specific code inside 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
>>
>> This patch adds a new virtual call to CollectedHeap and hides the G1 
>> specific code inside G1.
>>
>> I've verified that this doesn't cause any noticeable performance 
>> regressions with one of Robbin's intern string JMH micro benchmarks 
>> developed for JDK-8195097.
>>
>> Thanks,
>> StefanK


More information about the hotspot-dev mailing list