RFR (XXS): 8057799: G1: unnecessary null check in G1KeepAliveClosure
Tony Printezis
tprintezis at twitter.com
Wed Sep 10 03:28:44 UTC 2014
Hi Stefan,
Inline.
On 9/9/14, 5:03 AM, Stefan Karlsson wrote:
> 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.
Thanks.
> I had to verify that G1StringDedup doesn't assert with this change.
If it does, it would have asserted with the original code too, given
that _g1->in_cset_state(obj) is called before the null check.
> 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();
> }
Yeah, I added a print statement in weak_oops_do() and I can confirm that.
Tony
> thanks,
> StefanK
>
>>
>> If I could get a couple of reviews and a volunteer to sponsor this,
>> it'd be awesome. :-)
>>
>> Thanks,
>>
>> Tony
>>
>
--
Tony Printezis | JVM/GC Engineer / VM Team | Twitter
@TonyPrintezis
tprintezis at twitter.com
More information about the hotspot-gc-dev
mailing list