hotspot/test/runtime/Thread/TooSmallStackSize.java
changeset 46346 4085295dcf51
parent 41070 496463b4e206
child 46351 1b8f8edb7775
equal deleted inserted replaced
46345:a5c7cfdd44e4 46346:4085295dcf51
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   180          * Try again with a the minimum stack size that was given in the error message
   180          * Try again with a the minimum stack size that was given in the error message
   181          */
   181          */
   182         checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, min_stack_allowed);
   182         checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, min_stack_allowed);
   183 
   183 
   184         /*
   184         /*
       
   185          * Now try with a stack size that is not page aligned.
       
   186          */
       
   187         checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, "513");
       
   188 
       
   189         /*
   185          * Now redo the same tests with the compiler thread stack size:
   190          * Now redo the same tests with the compiler thread stack size:
   186          */
   191          */
   187         checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "16");
   192         checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "16");
   188         min_stack_allowed = checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "32");
   193         min_stack_allowed = checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "32");
   189         checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, min_stack_allowed);
   194         checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, min_stack_allowed);
       
   195         checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "513");
   190 
   196 
   191         /*
   197         /*
   192          * Now redo the same tests with the VM thread stack size:
   198          * Now redo the same tests with the VM thread stack size:
   193          */
   199          */
   194         checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "16");
   200         checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "16");
   195         min_stack_allowed = checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "32");
   201         min_stack_allowed = checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "32");
   196         checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, min_stack_allowed);
   202         checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, min_stack_allowed);
       
   203         checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, "513");
   197     }
   204     }
   198 }
   205 }