# HG changeset patch # User dlong # Date 1420757108 18000 # Node ID a7a3a60a96ed2ef3f517636d87331c840d2d41cd # Parent 8d988e8f3c2e0cd4e1f7e0717d845529baca1207# Parent bbdca807711d7a09f4c6ad074f736d5249ae307c Merge diff -r 8d988e8f3c2e -r a7a3a60a96ed test/lib/sun/hotspot/WhiteBox.java --- a/test/lib/sun/hotspot/WhiteBox.java Wed Jan 07 15:02:33 2015 +0100 +++ b/test/lib/sun/hotspot/WhiteBox.java Thu Jan 08 17:45:08 2015 -0500 @@ -84,6 +84,8 @@ return isClassAlive0(name.replace('.', '/')); } private native boolean isClassAlive0(String name); + public native boolean isMonitorInflated(Object obj); + public native void forceSafepoint(); // JVMTI public native void addToBootstrapClassLoaderSearch(String segment); diff -r 8d988e8f3c2e -r a7a3a60a96ed test/lib/sun/hotspot/code/BlobType.java --- a/test/lib/sun/hotspot/code/BlobType.java Wed Jan 07 15:02:33 2015 +0100 +++ b/test/lib/sun/hotspot/code/BlobType.java Thu Jan 08 17:45:08 2015 -0500 @@ -32,11 +32,11 @@ public enum BlobType { // Execution level 1 and 4 (non-profiled) nmethods (including native nmethods) - MethodNonProfiled(0, "CodeHeap 'non-profiled nmethods'"), + MethodNonProfiled(0, "CodeHeap 'non-profiled nmethods'", "NonProfiledCodeHeapSize"), // Execution level 2 and 3 (profiled) nmethods - MethodProfiled(1, "CodeHeap 'profiled nmethods'"), + MethodProfiled(1, "CodeHeap 'profiled nmethods'", "ProfiledCodeHeapSize"), // Non-nmethods like Buffers, Adapters and Runtime Stubs - NonNMethod(2, "CodeHeap 'non-nmethods'") { + NonNMethod(2, "CodeHeap 'non-nmethods'", "NonNMethodCodeHeapSize") { @Override public boolean allowTypeWhenOverflow(BlobType type) { return super.allowTypeWhenOverflow(type) @@ -44,14 +44,16 @@ } }, // All types (No code cache segmentation) - All(3, "CodeCache"); + All(3, "CodeCache", "ReservedCodeCacheSize"); public final int id; - private final String beanName; + public final String sizeOptionName; + public final String beanName; - private BlobType(int id, String beanName) { + private BlobType(int id, String beanName, String sizeOptionName) { this.id = id; this.beanName = beanName; + this.sizeOptionName = sizeOptionName; } public MemoryPoolMXBean getMemoryPool() { @@ -87,4 +89,8 @@ } return result; } + + public long getSize() { + return WhiteBox.getWhiteBox().getUintxVMFlag(sizeOptionName); + } }