RFR(L): 8029075 - String deduplication in G1

David Holmes david.holmes at oracle.com
Tue Mar 11 03:44:01 UTC 2014


On 11/03/2014 4:18 AM, Christian Thalinger wrote:
> On Mar 10, 2014, at 5:36 AM, Per Liden <per.liden at oracle.com> wrote:
>> The other part of the story, orthogonal to the memory overhead, is making reference processing more efficient once the referent becomes unreachable. I've seen many cases where heavy use of weak references (registered or not) overloads the reference handler thread.
> Interesting.  Is that because it’s just one thread?  How about using something like ThreadPoolExecutor for the reference handler thread(s)?

The synchronization that would be needed across multiple 
reference-handler threads might negate any benefit from having more than 
one. And a full blown ThreadPoolExecutor may be overkill here.

>> To improve that situation, I'd like to see the reference handler thread removed completely, and instead let the GC enqueue reference directly onto the reference queues.

That would require that the GC threads be able to execute Java code. It 
would also mean that a GC thread would experience synchronization (and 
possible contention) with Java threads.


>> /Per
>>> — John
>>> P.S. Connection with value types:  Eventually, we could add value types
>>> like java.lang.ref.WeakReferenceValue which would provide a standard
>>> form for this.  Or we could standardize the annotation, perhaps.
>>> P.P.S. For a little more on value types, see
>>> https://blogs.oracle.com/jrose/entry/value_types_and_struct_tearing

More information about the hotspot-dev mailing list