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

Kim Barrett kim.barrett at oracle.com
Thu Sep 25 21:48:11 UTC 2014


On Sep 25, 2014, at 6:28 AM, Marcus Larsson <marcus.larsson at oracle.com> wrote:
> 
> I appreciate your feedback on this. Some comments are inline.

And any responses similarly.  I’ll comment on the new webrev separately.

> On 09/19/2014 08:52 PM, Kim Barrett wrote:
> This was also my first thought, but after digging deeper I found that there's really only a single protocol.
> (Either that, or you could say there are three protocols, one for each template function.)
> Each subclass of CompactibleSpace seems to make use of all of the template functions,
> sometimes via CompactibleSpace::adjust_pointers/compact, and hence require all of the above functions
> (both protocols), although they sometimes also override these functions when necessary.

Yes.  I was a bit confused previously.  Fortunately, it seems like the direction
of the changes I suggested was still reasonably valid.

> Changed the template functions to be static instead, like they probably should have been from the beginning.
> The previous solution had some functions called via the implicit "this", while others were called using the proxy.

I suspected as much.

> To allow non-virtual calls of block_size for HeapRegions I moved the prepare_for_compaction from G1OffsetTableContigSpace
> to the HeapRegion class, and implemented the required functions in this class instead.

Hm, this might be worrying, or might not.  I’ll need to look at the webrev to understand this.




More information about the hotspot-gc-dev mailing list