changeset 1412:0871d61e2534

8061715: gc/g1/TestShrinkAuxiliaryData15.java fails with java.lang.RuntimeException: heap decommit failed - after > before Summary: test for auxiliary data in G1 fails as they cannot precisely measure this aux data size. I've added whitebox method to get this size. Reviewed-by: tschatzl, jwilhelm, mgerdin
author azakharov
date Mon, 16 Mar 2015 17:49:35 +0300
parents 0152071ab1ba
children 0a5629c31104
files test/lib/sun/hotspot/WhiteBox.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/sun/hotspot/WhiteBox.java	Fri Mar 06 04:58:52 2015 -0800
+++ b/test/lib/sun/hotspot/WhiteBox.java	Mon Mar 16 17:49:35 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 
 package sun.hotspot;
 
+import java.lang.management.MemoryUsage;
 import java.lang.reflect.Executable;
 import java.util.Arrays;
 import java.util.List;
@@ -94,8 +95,10 @@
   // G1
   public native boolean g1InConcurrentMark();
   public native boolean g1IsHumongous(Object o);
+  public native long    g1NumMaxRegions();
   public native long    g1NumFreeRegions();
   public native int     g1RegionSize();
+  public native MemoryUsage g1AuxiliaryMemoryUsage();
   public native Object[]    parseCommandLine(String commandline, char delim, DiagnosticCommand[] args);
 
   // NMT