JDK-8079646 : [mlvm] Avoid CodeCache overflows in general MLVM tests
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,11
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-11-17
  • Updated: 2019-01-31
  • Resolved: 2019-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
JDK-8208255 adds stack oveflow checking to MLVM MethodHandle graph generation routines to prevent MLVM tests from failing with StackOverflowError.

However, when running tests with the fix of the bug mentioned above, the tests are failing with CodeCache overflows:

Java HotSpot(TM) 64-Bit Server VM warning: CodeHeap 'non-nmethods' is full. Compiler has been disabled. 
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code heap size using -XX:ProfiledCodeHeapSize= 

Java HotSpot(TM) 64-Bit Server VM warning: CodeHeap 'non-profiled nmethods' is full. Compiler has been disabled. 
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code heap size using -XX:NonProfiledCodeHeapSize= 

Java HotSpot(TM) Client VM warning: CodeCache is full. Compiler has been disabled. 
Java HotSpot(TM) Client VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=

In order to fix this, the following can be done:

- Add CodeCache free space checking methods into WhiteBox API (JDK-8065152)
- Use these methods during estimating max. size of MethodHandle graph
- Add CodeCache overflow checks when calling the MethodHandle graph (as we do with stack checking)
- Add a test, which artifically provokes CodeCache overflow and expects it

Failing tests are:

vm/mlvm/meth/stress/compiler/sequences 
vm/mlvm/meth/stress/compiler/i2c_c2i 
vm/mlvm/**/breakpoint*