Need reviewers for changes in JVM initialization code (added check for -XX:StackShadowPages option)
David Holmes
David.Holmes at oracle.com
Wed Jul 28 16:56:11 PDT 2010
Tom Rodriguez said the following on 07/29/10 03:12:
>>> Tom Rodriguez said the following on 07/28/10 04:49:
>>>> I think you could put this check into arguments.cpp since I all
>>>> platforms would require a positive number for the
>>>> StackShadowPages. The same should be true of StackRedPages and
>>>> StackYellowPages. Actually they all should be required to
>>>> greater than 0 I think. Other than that I don't see other
>>>> obvious constraints on the values. That bug report doesn't
>>>> really show other problematic values, though I'm not sure I
>>>> follow the point of the guarantee that's failing either. What
>>>> does the min stack size have to do with the number of guard
>>>> pages? I would expect it to be checking against
>>>> ThreadStackSize and returning an error if it was too small like
>>>> the other places that check against TheadStackSize.
>> It's a simple sanity check that the minimum allowed stack size can
>> actually accommodate a stack with all the requested guard pages. We
>> need a minimum allowed, as well as a default (ThreadStackSize) for
>> when stacks are programmatically requested.
>
> Why should it be a guarantee instead of a simple check that returns
> an error code like the stack size check below it? It sort of make
> sense as a guarantee if the various Stack*Pages flags have their
> default value since we're not bootstrappable in that case but since
> they are adjustable by a user returning a real error message seems to
> make more sense.
I think it is a guarantee because if it is wrong then we need to update
our hard-wired min_stack_allowed value - which I presume has been
empirically determined. But given the user can mess with the Stack*Pages
settings I agree that it is inconsistent with other checks. (Perhaps a
leftover from a time these flags were not expected to be well known or
used?)
David
More information about the hotspot-dev
mailing list