RFR: 8259778: Merge MutableSpace and ImmutableSpace
David Holmes
david.holmes at oracle.com
Thu Jan 28 10:56:45 UTC 2021
On 28/01/2021 7:09 pm, Thomas Schatzl wrote:
> On Thu, 28 Jan 2021 05:13:57 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>>> Please review this change which merges ImmutableSpace into MutableSpace,
>>> eliminating the former. There were no interesting uses of ImmutableSpace,
>>> other than as the base class for MutableSpace. The name ImmutableSpace is
>>> kind of a misnomer given that usage.
>>>
>>> Testing:
>>> mach5 tier1-3
>>
>> src/hotspot/share/gc/parallel/mutableSpace.hpp line 47:
>>
>>> 45: //
>>> 46: // Invariant: bottom() <= top() <= end()
>>> 47: // top() is inclusive and end() is exclusive.
>>
>> If end() is exclusive then shouldn't the invariant be `< end()`?
>
> I also think that top() is also exclusive as in other collectors.
>
> @dholmes-ora : e.g. bottom == top == end means the space is empty. These two lines are not disagreeing with each other.
If one is exclusive and one is inclusive then I don't see how they can
be equal, as that implies they are then both inclusive and exclusive at
the same time. ?? If end() is exclusive then I would expect an empty
space to be one where bottom and end are adjacent, not coincident.
Cheers,
David
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/2271
>
More information about the serviceability-dev
mailing list