RFR(S) 8038404: Move object_iterate_mem from Space to CMS since it is only ever used by CMS

Stefan Karlsson stefan.karlsson at oracle.com
Thu Mar 27 12:55:32 UTC 2014


On 2014-03-27 13:35, Mikael Gerdin wrote:
> On Thursday 27 March 2014 11.13.50 Stefan Karlsson wrote:
>> On 2014-03-27 08:55, Thomas Schatzl wrote:
>>> Hi,
>>>
>>> On Wed, 2014-03-26 at 17:21 +0100, Mikael Gerdin wrote:
>>>> Hi,
>>>>
>>>> I'm doing some cleanups in the "Space" classes to simplify the code for
>>>> the G1 class unloading work[1].
>>>> Here's a change to move CMS specific code to CompactibleFreeListSpace:
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8038404
>>>> Webrev: http://cr.openjdk.java.net/~mgerdin/8038404/webrev.0
>>> - Could you also move the documentation of Space::object_iterate_mem()
>>> to CompactibleFreeListSpace::object_iterate_mem()?
>>>
>>> - the UpwardsObjectClosure also seems to be only used by
>>> Space::object_iterate_mem() too, and hence CMS. Is there some place to
>>> move it from the generic iterator.hpp to a CMS file?
> I moved UpwardsObjectClosure to concurrentMarkSweepGeneration.hpp
>
> New webrev: http://cr.openjdk.java.net/~mgerdin/8038404/webrev.1
> Incremental webrev: http://cr.openjdk.java.net/~mgerdin/8038404/webrev.0.to.1

I'm OK  with the change. However, I think UpwardsObjectClosure should 
have been placed together with CompactibleFreeListSpace and its 
object_iterate_mem(MemRegion, UpwardsObjectClosure) function, instead of 
putting it together with the single implementation of UpwardsObjectClosure.

thanks,
StefanK

>
> Thanks for reviewing
> /Mikael
>
>> I agree with Thomas. Except for that, this looks good.
>>
>> thanks,
>> StefanK
>>
>>> Thanks for the cleanup,
>>>
>>>     Thomas




More information about the hotspot-gc-dev mailing list