JDK-8202566 : Test Plan for JEP 331: Low-Overhead Heap Profiling
  • Type: JEP Task
  • Component: hotspot
  • Sub-Component: jvmti
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-03
  • Updated: 2018-05-18
  • Resolved: 2018-05-18
Related Reports
Blocks :  
Cloners :  
Duplicate :  
Duplicate :  
Sub Tasks
JDK-8202567 :  
JDK-8202568 :  
JDK-8202569 :  
JDK-8202570 :  
JDK-8202571 :  
JDK-8202572 :  
JDK-8202573 :  
Description
**Test Methodology** 

The test success criteria are: 

  1. All new JVMTI functions tested (covered by [JDK-8202567](https://bugs.openjdk.java.net/browse/JDK-8202567))
  2. All common use-cases tested (covered by [JDK-8202567](https://bugs.openjdk.java.net/browse/JDK-8202567))
  3. Accuracy testing of the sampling (covered by [JDK-8202567](https://bugs.openjdk.java.net/browse/JDK-8202567))
  4. Stability proven via being used in some simple application  (covered by [JDK-8202573](https://bugs.openjdk.java.net/browse/JDK-8202573))
  5. Proven to work with all openjdk supported GCs via the tests (covered by the tests themselves)
  6. Test pass rate 100% (covered by [JDK-8202570](https://bugs.openjdk.java.net/browse/JDK-8202570))
  7. Test stability >99%  (covered by [JDK-8202570](https://bugs.openjdk.java.net/browse/JDK-8202570))
  8. Show that the data is sane via the stacktraces collected and amount of data shown to be collected (covered by tests) 
  9. No overhead incurred due to the feature turned off, measured via performance tests (covered by [JDK-8202573](https://bugs.openjdk.java.net/browse/JDK-8202573))

**Test Inventory: New Tests**

The Test plan contains these new functional tests:

General tests:

 - HeapMonitorEventOnOffTest.java
 - HeapMonitorInterpreterArrayTest.java
 - HeapMonitorInterpreterObjectTest.java
 - HeapMonitorTest.java

Works with various sampling rates:

 - HeapMonitorStatArrayCorrectnessTest.java
 - HeapMonitorStatObjectCorrectnessTest.java
 - HeapMonitorStatRateTest.java
 - HeapMonitorStatSimpleTest.java
 - HeapMonitorArrayAllSampledTest.java

Works with VM collector:
 - HeapMonitorVMEventsTest.java

Illegal arguments and capabilities are well handled:

 - HeapMonitorIllegalArgumentTest.java
 - HeapMonitorNoCapabilityTest.java

Works with via threads:

 - HeapMonitorThreadOnOffTest.java
 - HeapMonitorThreadTest.java

Working across GCs:

 - HeapMonitorGCCMSTest.java
 - HeapMonitorGCParallelTest.java
 - HeapMonitorGCSerialTest.java
 - HeapMonitorGCTest.java

Explicitly test current unsupported use-cases:

 - HeapMonitorTwoAgentsTest.java
 - HeapMonitorEventsForTwoThreadsTest.java

**Test Configurations**

Due to the interactions between the runtime and the garbage collectors, the test should cover:

  - Various GCs being used (done via the HeapMonitorGC*Test.java)
  - Various runtime and JIT compilers being used (done via the HeapMonitorInterpreter*Test.java and other tests check for C2 support)
  - Currently, the implementation does not support multiple agents or per thread events, this is tested via (HeapMonitorTwoAgentsTest.java and HeapMonitorEventsForTwoThreadsTest.java)