RFR: 8139892: Allow G1CollectorPolicy to specify if reference processing should be enabled
tom.benson at oracle.com
Wed Nov 18 21:32:52 UTC 2015
I'm getting out of my depth of knowledge of reference processing here,
so will put this in the form of a question. 8^) In addition to what
you describe below and in JBS, the new code explicitly processes weak
JNI handles if should_process_references() is false. OK, that must be
done regardless of whether processing normal ref objects. (Perhaps a
comment to this effect above the call to the new
process_weak_jni_handles would be good.)
The code in ReferenceProcessor::process_discovered_references contains
some ancient comments about the ordering of processing normal refs vs
JNI refs, implying the latter must be last. (Referring to the equally
ancient JDK-4126360 <https://bugs.openjdk.java.net/browse/JDK-4126360>. )
This change seems to allow the order to be reversed, since JNI handles
will be processed before references are, at some point in the future.
Is there an issue that code might be relying on this ordering?
On 11/12/2015 8:12 AM, Mikael Gerdin wrote:
> Hi Erik,
> On 2015-11-10 14:05, Erik Helin wrote:
>> Hi all,
>> this patch adds the method `bool should_process_references() const` to
>> G1CollectorPolicy and also updates G1CollectedHeap to make use of it.
>> This enables a G1CollectorPolicy to make decisions about whether
>> references should be processed or not.
> Looks good to me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev