JDK-7200163 : add CodeComments functionality to assember stubs
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-09-21
  • Updated: 2013-06-26
  • Resolved: 2012-09-24
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.
JDK 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
The Assembler and CodeBuffer classes supply CodeComment / block_comment() functionality, which does not work with stubs. The comments are not printed with +PrintStubCode or +PrintInterpreter because the comments are lost when the code is turned into a Stub, while they are kept if the code is copied to a CodeBlob.

I propose to add this fix to the OpenJDK mainline. A webrev can be found here:


Basically the change passes the codeBuffer to the Stub constructor, and adapts the disassembler to print the comments.

In the debug build the  InterpreterCodelet Stub has a new field holding the code comments.

I also added some ttyLocks and \\ns to beautify the output.

Thank you and best regards,


EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/b31471cdc53e