8135200: Add White Box method that enumerates G1 old regions with less than specified liveness and collects statistics
authorkzhaldyb
Wed, 20 Apr 2016 19:16:32 +0300
changeset 37954 74d146e5be3b
parent 37953 195cce402934
child 37958 04a779e51d6e
8135200: Add White Box method that enumerates G1 old regions with less than specified liveness and collects statistics Reviewed-by: tschatzl, dfazunen, iignatyev
test/lib/sun/hotspot/WhiteBox.java
--- a/test/lib/sun/hotspot/WhiteBox.java	Tue Apr 19 13:19:41 2016 +0200
+++ b/test/lib/sun/hotspot/WhiteBox.java	Wed Apr 20 19:16:32 2016 +0300
@@ -192,6 +192,16 @@
   public native long psVirtualSpaceAlignment();
   public native long psHeapGenerationAlignment();
 
+  /**
+   * Enumerates old regions with liveness less than specified and produces some statistics
+   * @param liveness percent of region's liveness (live_objects / total_region_size * 100).
+   * @return long[3] array where long[0] - total count of old regions
+   *                             long[1] - total memory of old regions
+   *                             long[2] - lowest estimation of total memory of old regions to be freed (non-full
+   *                             regions are not included)
+   */
+  public native long[] g1GetMixedGCInfo(int liveness);
+
   // NMT
   public native long NMTMalloc(long size);
   public native void NMTFree(long mem);