Request for review - 8013032 - CMS: assert(used() == used_after_gc && used_after_gc <= capacity()) failed

Jon Masamitsu jon.masamitsu at
Wed May 8 23:33:32 UTC 2013


Another reviewer liked having the comments in

920   // The heap has been compacted but not reset yet.
921   // Any metric such as free() or used() will be incorrect.

so I've added them back.  I decided that the distraction of having
the comments there was overridden by the value they provided to
at least one person.


On 4/26/2013 10:13 AM, Jon Masamitsu wrote:
> Thomas,
> I can remove the comments.  They are there mostly to explain why the
> assertion checking should be removed for the code reviewer.  I've 
> removed them.
> Jon
> On 4/26/2013 5:26 AM, Thomas Schatzl wrote:
>> Hi,
>> On Thu, 2013-04-25 at 10:43 -0700, Jon Masamitsu wrote:
>>> CMS: assert(used() == used_after_gc && used_after_gc <= capacity())
>>> failed: used: 0 used_after_gc: 292080 capacity: 1431699456
>>> The assertion was incorrect so I deleted it.  The assumption that the
>>> metrics being tested should not be affected by the 
>>> reset_after_compaction()
>>> was incorrect.
>> In the comment maybe add an explicit note that because of that we cannot
>> verify heap sizes yet. I.e. something along "So we cannot verify heap
>> sizes yet".
>> When reading this comment I asked myselves what the particular reason
>> for that comment at that point is. I mean, during recomputation of heap
>> sizes there're often windows where there are inconsistencies between
>> data. So the comment tells me facts, but not the actual warning what
>> (not) to do at this point (imho).
>> But to me this is a minor issue, you may keep the message (or remove the
>> message altogether).
>> Thomas

More information about the hotspot-gc-dev mailing list