RFR (S): 8043243: convert SCAN_AND_FORWARD, SCAN_AND_ADJUST_POINTERS, SCAN_AND_COMPACT macros to methods

Mikael Gerdin mikael.gerdin at oracle.com
Thu Aug 28 12:21:31 UTC 2014


Hi Marcus,

On 08/28/2014 01:46 PM, Marcus Larsson wrote:
> Hi,
>
> I would like reviews for the following patch converting the SCAN_AND_*
> macros into (inline) methods.
>
> Short summary:
> The change is based on the demacroify.patch (bug attachment), using a
> proxy class to enable different functions for obj_size and similar to be
> used for different types of Spaces. Each type of space has a proxy
> defining which methods should be used in the scan_and_* functions.
> Made no changes to the actual code in the macros, except for replacing a
> multi-line debug_only(...) with #ifdef ASSERT ... #endif.
>
> Webrev:
> http://cr.openjdk.java.net/~brutisso/webrev-8043243/

It looks like you replaced all the C-style /* */ comments in 
SCAN_AND_FORWARD but not in the other variants. Please change all of 
them or leave them in the old style.

In the places where you call block_is_obj and block_size for known 
subclasses of Space, should we consider doing direct calls to the known 
implementations to avoid the cost of the virtual call?
Something like
_cfls->CompactibleFreeListSpace::block_is_obj(addr)
and so on.
It's just an idea, though.

I agree with Stefan's comments about looking at GC times on the 
benchmarks and not only the scores. If the benchmarks don't do that many 
full gcs a regression in full gc times may not affect the score 
significantly.

/Mikael

>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8043243
>
> Testing:
> jprt without problems
> SPECjbb2013, SPECjbb2005, SPECjvm2008 - no significant changes
>
> Thanks,
> Marcus



More information about the hotspot-gc-dev mailing list