annotating generated code with source and bytecode info

Christian Thalinger christian.thalinger at oracle.com
Thu May 23 15:26:20 PDT 2013


On May 23, 2013, at 2:41 PM, Doug Simon <doug.simon at oracle.com> wrote:

> Hi Tom,
> 
> On May 23, 2013, at 6:55 PM, "Deneau, Tom" <tom.deneau at amd.com> wrote:
> 
>> 
>> We would like to be able to annotate our HSAIL code generation (using comments)
>> to get something like the annotations that are seen in the AMD64 disassembly. (as shown below)
> 
> The comments in your example are automatically generated by HotSpot's disassembler.
> 
> I'm am making a push right now that connects comments added via TargetMethodAssembler.blockComment() to the output of the disassembler. Once you have pulled changeset d552919fbb05 (which should be in the OpenJDK repo within the next hour) you can see it in action as follows (code comments are only supported in non-product builds):
> 
> % mx build fastdebug
> % mx --fastdebug vm -XX:CompileCommand=print,*Object.toString
> 
> The line "  ;; [stack overflow check]" comment in the output is produced by AMD64HotSpotBackend.java:90:
> 
>    tasm.blockComment("[stack overflow check]");

This is great.  Thanks for doing this.

-- Chris

> 
> -Doug



More information about the graal-dev mailing list