RFR: JDK-8243991 Use standard -Xss argument in java command line
David Holmes
david.holmes at oracle.com
Wed Apr 29 01:48:59 UTC 2020
Hi Magnus,
On 29/04/2020 3:51 am, Magnus Ihse Bursie wrote:
> On 2020-04-28 18:33, Erik Joelsson wrote:
>>
>> On 2020-04-28 09:14, Magnus Ihse Bursie wrote:
>>> It builds without it. I tested running the tier1 test suite; but I
>>> assume that if the build succeeds there's really all there is to it.
>>>
>>> I'm not sure where to look for performance issues. Is there some
>>> specific thing you're worried about? If anything, I think this might
>>> be affecting machines with different memory sizes differently, but
>>> I'm not really in the mood to try this on a wide range of machines
>>> just to find that out.
>>>
>>> Otherwise I'd assume you'd either get a stack overflow exception, or
>>> everything is green. Shrinking the stack size could possibly mean
>>> that the build will pass on low-end machines where it previously failed.
>>>
>> I did a bit of digging in the bug database and these settings are very
>> old. Here is a quote from a comment on a build problem on Solaris
>> Sparc 64 bit from 2001:
>>
>> "There is a comment in the VM source tree which stated that the
>> ThreadStackSize needed to be increased to 512K in order to build the
>> JDK. The 64 bit VM uses twice as much memory as the 32 bit VM so it
>> might be worth increasing the ThreadStackSize for the JAVAC operations
>> to 1024K for 64 bit builds. The jdk builds currenty use 768K
>> ThreadStacks."
>>
>> I think this makes it clear that the intention was to increase the
>> size of the thread stacks and at the time it was needed to even make
>> it build. I believe the JVM has matured enough since then to safely
>> remove these options now.
I tracked this back, way back, .... its ancient. :) Originally the first
setting of ThreadStackSize was 768K (needed for 64-bit) in the 1.4.0 dev
days (Jan 2001). Later (JDK-4448510 June 2001) it was determined 768K
was too small on sparcv9 so it was split into 768K for 32-bit and 1024K
for 64-bit. Then in August 2003 it was further increased for 64-bit IA64
(JDK-4905568) and they just doubled the 32-bit value (though that may
have been a workaround for a javac bug). And there you have it.
> New webrev where I remove the flag altogether:
>
> http://cr.openjdk.java.net/~ihse/JDK-8243991-fix-Xss-in-java-args/webrev.02
I think this is perfectly reasonable. The default stack sizes should be
more than adequate.
I have to wonder about the other VM flags that get set e.g. for heap :)
Thanks,
David
-----
> /Magnus
>>
>> /Erik
>>
>>
>
More information about the build-dev
mailing list