RFR (S): 8035326: Assume non-NULL references in G1CollectedHeap::in_cset_fast_test

Stefan Karlsson stefan.karlsson at oracle.com
Thu Feb 20 09:00:14 UTC 2014


Hi Thomas,

On 2014-02-19 16:12, Thomas Schatzl wrote:
> Hi all,
>
>    can I get reviews for the following change that lifts the assumption
> that the oop* passed to G1CollectedHeap::in_cset_fast_test is non-null,
> allowing manual optimization of code.
>
> Almost all uses of G1CollectedHeap::in_cset_fast_test() already made
> sure that non-null references are passed to it. The only remaining one,
> in G1ParCopyClosure::do_oop_work() actually benefits from lifting this
> restriction by allowing removal of some additional checks.
>
> Also removes another superfluous check in the same method.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8035326
>
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8035326/webrev/

Looks good to me.

4794   if (!oopDesc::is_null(heap_oop)) {

Did you consider doing an early return instead of adding an extra 
indentation level to the do_oop_work function?

4828       assert(obj != NULL, "must be");

I don't think we need this assert:

thanks,
StefanK

>
> This is based on the change for 8027559.
>
> Testing:
> jprt
>
>
>
> Thanks,
>    Thomas
>




More information about the hotspot-gc-dev mailing list