< prev index next >

test/hotspot/jtreg/vmTestbase/metaspace/gc/MetaspaceBaseGC.java

Print this page
rev 60538 : imported patch jep387-test.patch


  84 
  85     public final void run(String args[]) {
  86         configure(args);
  87         if (pool == null) {
  88             System.out.println("%%% Cannot pull the pool, most likely 32-bits only");
  89             return;
  90         }
  91         System.out.println("%%% Working with " + getPoolName());
  92         for (String vmA: vmArgs) {
  93             if (vmA.contains("Metaspace") || vmA.contains("Compressed")) {
  94                 System.out.println("%  " + vmA);
  95             }
  96         }
  97         doCheck();
  98         System.out.println("% Test passed.");
  99     }
 100 
 101 
 102     protected void configure(String args[]) {
 103         vmArgs.addAll(ManagementFactory.getRuntimeMXBean().getInputArguments());
 104         useLargepages = PAGE_SIZE > 1_000_000 && !vmArgs.contains("-XX:-UseLargePagesInMetaspace");
 105 
 106         System.out.println(vmArgs);
 107 
 108         pool = getMemoryPool(getPoolName());
 109         if (pool == null) {
 110             return; // nothing to check
 111         }
 112         for (String arg: vmArgs) {
 113             if (arg.startsWith("-Xlog:gc") && arg.length() > 8) {
 114                gclogFileName = arg.substring(arg.lastIndexOf(':') + 1);
 115             }
 116         }
 117         parseArgs(args);
 118     }
 119 
 120 
 121     /**
 122      * Imitates class loading.
 123      * Each invocation of this method causes a new class loader object is created
 124      * and a new class is loaded by this class loader.




  84 
  85     public final void run(String args[]) {
  86         configure(args);
  87         if (pool == null) {
  88             System.out.println("%%% Cannot pull the pool, most likely 32-bits only");
  89             return;
  90         }
  91         System.out.println("%%% Working with " + getPoolName());
  92         for (String vmA: vmArgs) {
  93             if (vmA.contains("Metaspace") || vmA.contains("Compressed")) {
  94                 System.out.println("%  " + vmA);
  95             }
  96         }
  97         doCheck();
  98         System.out.println("% Test passed.");
  99     }
 100 
 101 
 102     protected void configure(String args[]) {
 103         vmArgs.addAll(ManagementFactory.getRuntimeMXBean().getInputArguments());

 104 
 105         System.out.println(vmArgs);
 106 
 107         pool = getMemoryPool(getPoolName());
 108         if (pool == null) {
 109             return; // nothing to check
 110         }
 111         for (String arg: vmArgs) {
 112             if (arg.startsWith("-Xlog:gc") && arg.length() > 8) {
 113                gclogFileName = arg.substring(arg.lastIndexOf(':') + 1);
 114             }
 115         }
 116         parseArgs(args);
 117     }
 118 
 119 
 120     /**
 121      * Imitates class loading.
 122      * Each invocation of this method causes a new class loader object is created
 123      * and a new class is loaded by this class loader.


< prev index next >