RFR: 8202647: Add deduplicate_string function to CollectedHeap

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 7 13:12:02 UTC 2018


And here is the webrev:
http://cr.openjdk.java.net/~stefank/8202647/webrev.01/

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