hotspot/test/compiler/startup/SmallCodeCacheStartup.java
changeset 27420 04e6f914cce1
parent 22918 1c22d2094420
child 27702 57d2f1cacc26
equal deleted inserted replaced
27419:a934f24b4dcf 27420:04e6f914cce1
    25  * @test
    25  * @test
    26  * @bug 8023014
    26  * @bug 8023014
    27  * @summary Test ensures that there is no crash if there is not enough ReservedCodeacacheSize
    27  * @summary Test ensures that there is no crash if there is not enough ReservedCodeacacheSize
    28  *          to initialize all compiler threads. The option -Xcomp gives the VM more time to
    28  *          to initialize all compiler threads. The option -Xcomp gives the VM more time to
    29  *          to trigger the old bug.
    29  *          to trigger the old bug.
    30  * @run main/othervm -XX:ReservedCodeCacheSize=3m -XX:CICompilerCount=64 -Xcomp SmallCodeCacheStartup
    30  * @library /testlibrary
    31  */
    31  */
       
    32 import com.oracle.java.testlibrary.*;
       
    33 
    32 public class SmallCodeCacheStartup {
    34 public class SmallCodeCacheStartup {
    33   public static void main(String[] args) throws Exception {
    35   public static void main(String[] args) throws Exception {
       
    36     try {
       
    37       ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=3m",
       
    38                                                                 "-XX:CICompilerCount=64",
       
    39                                                                 "-Xcomp",
       
    40                                                                 "SmallCodeCacheStartup");
       
    41       pb.start();
       
    42     } catch (VirtualMachineError e) {}
       
    43 
    34     System.out.println("TEST PASSED");
    44     System.out.println("TEST PASSED");
    35   }
    45   }
    36 }
    46 }