src/share/tools/whitebox/sun/hotspot/WhiteBox.java

Print this page
rev 3953 : JDK-8005012: Add WB APIs to better support NMT testing
Summary:


  59     registerNatives();
  60   }
  61 
  62   // Memory
  63   public native long getObjectAddress(Object o);
  64   public native int  getHeapOopSize();
  65 
  66   // Runtime
  67   // Make sure class name is in the correct format
  68   public boolean isClassAlive(String name) {
  69     return isClassAlive0(name.replace('.', '/'));
  70   }
  71   private native boolean isClassAlive0(String name);
  72 
  73   // G1
  74   public native boolean g1InConcurrentMark();
  75   public native boolean g1IsHumongous(Object o);
  76   public native long    g1NumFreeRegions();
  77   public native int     g1RegionSize();
  78   public native Object[]    parseCommandLine(String commandline, DiagnosticCommand[] args);





  79 }


  59     registerNatives();
  60   }
  61 
  62   // Memory
  63   public native long getObjectAddress(Object o);
  64   public native int  getHeapOopSize();
  65 
  66   // Runtime
  67   // Make sure class name is in the correct format
  68   public boolean isClassAlive(String name) {
  69     return isClassAlive0(name.replace('.', '/'));
  70   }
  71   private native boolean isClassAlive0(String name);
  72 
  73   // G1
  74   public native boolean g1InConcurrentMark();
  75   public native boolean g1IsHumongous(Object o);
  76   public native long    g1NumFreeRegions();
  77   public native int     g1RegionSize();
  78   public native Object[]    parseCommandLine(String commandline, DiagnosticCommand[] args);
  79   
  80   // NMT
  81   public native boolean NMTAllocTest();
  82   public native boolean NMTFreeTestMemory();
  83   public native boolean NMTWaitForDataMerge();
  84 }