tool or option for viewing LIR nodes
duboscq at ssw.jku.at
Sat May 4 13:02:22 PDT 2013
The server vm that contains Graal (--vm server) should definitely pick up
all -G options including -G:Dump= and -G:+PrintCFG.
Since you are talking about unit tests i suppose you are using the
GraalCompilerTest's method to explicitly trigger compilation.
I don't know how you are structuring your tests but there are some "Debug
scopes" that need to be properly set up for these flags to work. Normally
if you just make your test a subclass of GraalCompilerTest and then use its
methods if should be fine.
On Sat, May 4, 2013 at 2:30 AM, Vasanth Venkatachalam <
Vasanth.Venkatachalam at amd.com> wrote:
> Some more context to my question.
> I've added a Graal backend for HSAIL code generation. I'm debugging the
> codegen for a test case where running with the --vm server option produces
> some incorrect results.
> Thus I'd like to view the nodes that are produced when running with the mx
> --vm server option.
> It looks like the c1visualizer tool can't be used with --vm server. Is
> there another tool that can help?
> I had a similar issue with the IdealGraphVisualizer. The -G:Dump= option
> isn't recognized when running with --vm server.
> -----Original Message-----
> From: graal-dev-bounces at openjdk.java.net [mailto:
> graal-dev-bounces at openjdk.java.net] On Behalf Of Christian Wimmer
> Sent: Friday, May 03, 2013 12:22 PM
> To: graal-dev at openjdk.java.net
> Subject: Re: tool or option for viewing LIR nodes
> On 05/03/2013 09:23 AM, Venkatachalam, Vasanth wrote:
> > Is there a tool or option that would allow us to view the LIR nodes that
> Graal generates for a program?
> Graal can output the graph, LIR, register allocator liveness information,
> and machine code in the format required by the Client Compiler Visualizer.
> As the name implies, the tool was originally written to visualize the data
> structures of the Java HotSpot client compiler.
> You can get it here: https://java.net/projects/c1visualizer/
> The output is controlled the same ways as the output to the Ideal Graph
> Visualizer, i.e., the -G:Dump= flag. In addition, I think you have to also
> pass -G:+PrintCFG
> The tool is file-based, i.e., you get .cfg files in your working directory
> that you can load with the c1visualizer.
More information about the graal-dev