Merge
This commit is contained in:
commit
8bce93d54b
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
||||
<name>OpenJDK (Native)</name>
|
||||
<c-extensions>c,m</c-extensions>
|
||||
<cpp-extensions>cc,cpp</cpp-extensions>
|
||||
<header-extensions>ad,h,hpp,in_out</header-extensions>
|
||||
<header-extensions>ad,h,hh,hpp,in_out,map,txt</header-extensions>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
<sourceRootList>
|
||||
@ -26,6 +26,9 @@
|
||||
<type>0</type>
|
||||
</confElem>
|
||||
</confList>
|
||||
<formatting>
|
||||
<project-formatting-style>false</project-formatting-style>
|
||||
</formatting>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
|
@ -34,6 +34,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import sun.hotspot.gc.GC;
|
||||
|
||||
/**
|
||||
* The Class to be invoked by jtreg prior Test Suite execution to
|
||||
@ -56,11 +57,12 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
map.put("vm.bits", vmBits());
|
||||
map.put("vm.flightRecorder", vmFlightRecorder());
|
||||
map.put("vm.simpleArch", vmArch());
|
||||
vmGC(map); // vm.gc.X = true/false
|
||||
|
||||
dump(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return vm.simpleArch value of "os.simpleArch" property of tested JDK.
|
||||
*/
|
||||
@ -146,6 +148,24 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
return "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* For all existing GC sets vm.gc.X property.
|
||||
* Example vm.gc.G1=true means:
|
||||
* VM supports G1
|
||||
* User either set G1 explicitely (-XX:+UseG1GC) or did not set any GC
|
||||
* @param map - property-value pairs
|
||||
*/
|
||||
protected void vmGC(Map<String, String> map){
|
||||
GC currentGC = GC.current();
|
||||
boolean isByErgo = GC.currentSetByErgo();
|
||||
List<GC> supportedGC = GC.allSupported();
|
||||
for (GC gc: GC.values()) {
|
||||
boolean isSupported = supportedGC.contains(gc);
|
||||
boolean isAcceptable = isSupported && (gc == currentGC || isByErgo);
|
||||
map.put("vm.gc." + gc.name(), "" + isAcceptable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps the map to the file if the file name is given as the property.
|
||||
* This functionality could be helpful to know context in the real
|
||||
|
Loading…
Reference in New Issue
Block a user