JDK-8131167 : Make CodeBuffer dynamically grow/shrink as needed without having to provide a guess of how much space we need in advance
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2015-07-14
  • Updated: 2019-02-26
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Make CodeBuffer dynamically grow/shrink as needed without having to provide a guess of how much space we need in advance

For JDK-8079156 we had to manually change the instr buffer size for CodeBuffer to account for StackShadowPages=50 (it only had enough room for StackShadowPages=32).

It seems fragile to have to provide a guess on how big the CodeBuffer needs to be, then hope that the testing will catch all the cases where we might turn on/off some features that might have an impact on CodeBuffer instr sizes.

A robust solution would be to make CodeBuffer figure out on its own how large buffers it needs (allocating more or compacting as needed).

One additional benefit would be less space requirements (assuming we can compact the buffer space) compared to current solution, where we allocate high and hope we have enough room, but most certainly waisting some in the process.