Existing jtreg @requires vm.gc implementation is based on parsing command line flags: -XX:+Use???GC.
But this information is not always correct:
- some GC might be unsupported (a warning message is printed then)
- -XX:+UseDetermenisticGC does not turn a GC, but just a mode of G1
To support such cases we need more accurate setting of @requires properties.
To make it possible to fix:
JDK-8151283: Implement setting jtreg @requires property vm.isG1Supported.
JDK-8153758 : @requires should use more accurate GC type parsing.
We need to extend the WhiteBox API:
The following methods are required:
public native boolean gcSelectedByErgo()
public native String getGC();
private native boolean supportsSerialGC();
private native boolean supportsParallelGC();
private native boolean supportsConcMarkSweepGC();
private native boolean supportsG1GC();
But this information is not always correct:
- some GC might be unsupported (a warning message is printed then)
- -XX:+UseDetermenisticGC does not turn a GC, but just a mode of G1
To support such cases we need more accurate setting of @requires properties.
To make it possible to fix:
JDK-8153758 : @requires should use more accurate GC type parsing.
We need to extend the WhiteBox API:
The following methods are required:
public native boolean gcSelectedByErgo()
public native String getGC();
private native boolean supportsSerialGC();
private native boolean supportsParallelGC();
private native boolean supportsConcMarkSweepGC();
private native boolean supportsG1GC();
- blocks
-
JDK-8151283 Implement setting jtreg @requires property vm.isG1Supported.
-
- Resolved
-