JDK-8037821 : Account for trampoline stubs when estimating code buffer sizes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-03-19
  • Updated: 2019-09-13
  • Resolved: 2014-03-25
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.
8u20Fixed 9 b08Fixed
Change 8016696 added support for trampoline stubs.  The sizes of these stubs were not accounted for when computing the expected size of the stubs section in shorten_branches().

This change introduces a small class CallStubImpl in the hpp section in the ad file which contains the size functions. Using a class avoids further 'extern' declarations.  Putting the functions in the header assures they can be inlined and thus optimized away on platforms other than ppc64 where they return '0'. The ad_xxx.hpp file is included in output.cpp anyways.

To finally clean up the extern declarations in output.cpp this change introduces another small class HandlerImpl wrapping the corresponding functions for the handler stubs (exception and deopt).  This also now makes the size computation inlineable.