RFR(S): 8048179: Early reclaim of large objects that are referenced by a few objects
Bengt Rutisson
bengt.rutisson at oracle.com
Thu Dec 18 16:01:47 UTC 2014
Hi Thomas,
Latest webrev looks good to me.
Thanks,
Bengt
On 2014-12-18 16:43, Thomas Schatzl wrote:
> Hi Bengt,
>
> On Wed, 2014-12-17 at 11:23 +0100, Bengt Rutisson wrote:
>> Hi Thomas,
>>
>> New webrev looks good.
>>
>> Two questions:
>>
>> What do you think about changing
>> OtherRegionsTable::occupancy_less_or_equal_than() to be something like:
>>
>> bool OtherRegionsTable::occupancy_less_or_equal_than(size_t limit) const {
>> if (limit <= (size_t)G1RSetSparseRegionEntries) {
>> return occ_coarse() == 0 && _first_all_fine_prts == NULL &&
>> occ_sparse() <= limit;
>> } else {
>> Unimplemented();
>> // Current uses of this method only use values less than
>> G1RSetSparseRegionEntries for the limit.
>> // If we want to use it for larger values we need to implement the
>> more expensive iteration over
>> // the remembered set to check the limit.
>> return false;
>> }
>> }
>>
>> I think the Unimplemented() check communicates that it is this method
>> that is having a problem, not the caller of the method.
>>
> I do not see either better than the other - in any case the VM will
> crash with an error message. I changed it to this version anyway.
>
>> The second question is about the flag name. I realize that
>> G1ReclaimDeadHumongousObjectsWithStaleRefsAtYoungGC is correct and that
>> it is in analogy with G1ReclaimDeadHumongousObjectsAtYoungGC. But it is
>> very long. Can we find some way of shortening it? I know it was me who
>> suggested to include "WithStaleRefs" in the name...
>>
>> Maybe the flags could be called G1EagerReclaimOfHumObjs and
>> G1EagerReclaimOfHumObjsWithStaleRefs ?
> I do not like abbreviations in flag names; Bengt and me discussed
> offline and came up with the following new names for the flags:
>
> G1EagerReclaimHumongousObjects
> G1EagerReclaimHumongousObjectsWithStaleRefs
> G1TraceEagerReclaimHumongousObjects
>
> I.e. remove the "Dead" because the GC only ever reclaims dead objects
> anyway, and remove the "AtYoungGC" because it seems somewhat superfluous
> too: we can already reclaim humongous objects at all other GCs (marking,
> full gcs), there would be nothing "eager" about it if it were only done
> in these situations.
>
> I am fine with adding "AtYoungGC" again if someone objects to that.
>
> Any objections or alternatives?
>
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8048179/webrev.2/
> Webrev diff:
> http://cr.openjdk.java.net/~tschatzl/8048179/webrev.1_to_2/
>
> Thanks,
> Thomas
>
>
More information about the hotspot-gc-dev
mailing list