RFR (XXS): 8057799: G1: unnecessary null check in G1KeepAliveClosure
Stefan Karlsson
stefan.karlsson at oracle.com
Tue Sep 9 09:03:56 UTC 2014
Hi Tony,
On 2014-09-08 17:29, Tony Printezis wrote:
> (following a quick e-mail exchange with Thomas)
>
> Here's a small change to remove an unnecessary NULL check from
> G1KeepAliveClosure:
>
> http://cr.openjdk.java.net/~tonyp/8057799/webrev.0/
Looks good.
I had to verify that G1StringDedup doesn't assert with this change.
There's no explicit null-check in the code, but we don't set the oops to
NULL G1StringDedupTable.
A side-note: I think this call to JNIHandles::weak_oops_do(&is_alive,
&keep_alive) is not needed, since it's already cleaned during the
reference processing:
void ReferenceProcessor::process_phaseJNI(BoolObjectClosure* is_alive,
OopClosure* keep_alive,
VoidClosure* complete_gc) {
...
JNIHandles::weak_oops_do(is_alive, keep_alive);
complete_gc->do_void();
}
thanks,
StefanK
>
> If I could get a couple of reviews and a volunteer to sponsor this,
> it'd be awesome. :-)
>
> Thanks,
>
> Tony
>
More information about the hotspot-gc-dev
mailing list