test/testlibrary/whitebox/sun/hotspot/code/BlobType.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff test/testlibrary/whitebox/sun/hotspot/code/BlobType.java
test/testlibrary/whitebox/sun/hotspot/code/BlobType.java
Print this page
rev 7461 : 8066440: Various changes in testlibrary for JDK-8059613
Reviewed-by: iignatyev
Contributed-by: dmitrij.pochepko@oracle.com
*** 30,59 ****
import sun.hotspot.WhiteBox;
public enum BlobType {
// Execution level 1 and 4 (non-profiled) nmethods (including native nmethods)
! MethodNonProfiled(0, "CodeHeap 'non-profiled nmethods'"),
// Execution level 2 and 3 (profiled) nmethods
! MethodProfiled(1, "CodeHeap 'profiled nmethods'"),
// Non-nmethods like Buffers, Adapters and Runtime Stubs
! NonNMethod(2, "CodeHeap 'non-nmethods'") {
@Override
public boolean allowTypeWhenOverflow(BlobType type) {
return super.allowTypeWhenOverflow(type)
|| type == BlobType.MethodNonProfiled;
}
},
// All types (No code cache segmentation)
! All(3, "CodeCache");
public final int id;
! private final String beanName;
! private BlobType(int id, String beanName) {
this.id = id;
this.beanName = beanName;
}
public MemoryPoolMXBean getMemoryPool() {
for (MemoryPoolMXBean bean : ManagementFactory.getMemoryPoolMXBeans()) {
String name = bean.getName();
--- 30,61 ----
import sun.hotspot.WhiteBox;
public enum BlobType {
// Execution level 1 and 4 (non-profiled) nmethods (including native nmethods)
! MethodNonProfiled(0, "CodeHeap 'non-profiled nmethods'", "NonProfiledCodeHeapSize"),
// Execution level 2 and 3 (profiled) nmethods
! MethodProfiled(1, "CodeHeap 'profiled nmethods'", "ProfiledCodeHeapSize"),
// Non-nmethods like Buffers, Adapters and Runtime Stubs
! NonNMethod(2, "CodeHeap 'non-nmethods'", "NonNMethodCodeHeapSize") {
@Override
public boolean allowTypeWhenOverflow(BlobType type) {
return super.allowTypeWhenOverflow(type)
|| type == BlobType.MethodNonProfiled;
}
},
// All types (No code cache segmentation)
! All(3, "CodeCache", "ReservedCodeCacheSize");
public final int id;
! public final String sizeOptionName;
! public final String beanName;
! private BlobType(int id, String beanName, String sizeOptionName) {
this.id = id;
this.beanName = beanName;
+ this.sizeOptionName = sizeOptionName;
}
public MemoryPoolMXBean getMemoryPool() {
for (MemoryPoolMXBean bean : ManagementFactory.getMemoryPoolMXBeans()) {
String name = bean.getName();
*** 85,90 ****
--- 87,96 ----
// there is no MethodProfiled in non tiered world or pure C1
result.remove(MethodProfiled);
}
return result;
}
+
+ public long getSize() {
+ return WhiteBox.getWhiteBox().getUintxVMFlag(sizeOptionName);
+ }
}
test/testlibrary/whitebox/sun/hotspot/code/BlobType.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File