Request for review (S): 7110718 -XX:MarkSweepAlwaysCompactCount=0 crashes the JVM
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Nov 16 09:49:07 UTC 2011
Hi all,
Here is an updated webrev. As John Cuthbertson suggested, I am now using
verify_min_value(). That made the change really nice and small.
Changing MarkSweepAlwaysCompactCount to unsigned, as Jon suggested,
turned out to be more involved than I would like. We use
MarkSweepAlwaysCompactCount together with IntFlagSetting. There is no
UIntFlagSetting implementation, so I would either have to add that or
cast the values back and forth to int and uint. Seems easier to leave
the flag as int.
http://cr.openjdk.java.net/~brutisso/7110718/webrev.02/
Bengt
On 2011-11-15 15:46, Bengt Rutisson wrote:
>
> John,
>
> Thanks for the review!
>
> On 2011-11-14 21:19, John Cuthbertson wrote:
>> Hi Bengt,
>>
>> Why not use verify_min_value()?
>
> You are right. I'll change to using verify_min_value().
>
> Bengt
>
>
>>
>> JohnC
>>
>> On 11/14/11 01:25, Bengt Rutisson wrote:
>>>
>>> Hi all,
>>>
>>> Can I have a couple of reviews for this small change?
>>> http://cr.openjdk.java.net/~brutisso/7110718/webrev.01/
>>>
>>> It is a fix for the issue that Ramki reported recently.
>>> MarkSweepAlwaysCompactCount is used for division and Hotspot crashes
>>> if it is set to 0.
>>>
>>> I choose to log an error and exit the VM if someone tries to start
>>> with -XX:MarkSweepAlwaysCompactCount=0. An alternative is to just
>>> log a warning and set it to 1.
>>>
>>> I prefer the error way since it is not really clear what one wants
>>> to achieve with MarkSweepAlwaysCompactCount=0. Always do full
>>> compactions or never do full compactions? So I am not convinced that
>>> 1 is an appropriate value.
>>>
>>> Also, since the VM, up until now, has crashed if someone tried
>>> -XX:MarkSweepAlwaysCompactCount=0 I think we can be sure that there
>>> are no customers that are running with that setting. It should be
>>> safe to forbid it.
>>>
>>> CR:
>>>
>>> 7110718 -XX:MarkSweepAlwaysCompactCount=0 crashes the JVM
>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7110718
>>>
>>> Thanks,
>>> Bengt
>>
>
More information about the hotspot-gc-dev
mailing list