dump to system.out
Thomas Wuerthinger
thomas.wuerthinger at oracle.com
Tue Feb 19 14:56:36 PST 2013
Peng,
Debug.dump(graph, "name") is used to transmit the graph over network to a running instance of the IdealGraphVisualizer ("mx igv"). You can enable it by specifying "-G:Dump=" followed optionally by a regular expression identifying the phase you want to dump. Also, you can use the -G:MethodFilter option to further narrow down the debug output to specific compiled methods.
For getting output on the console, there is the "-G:Log=" command with similar specification rules as "-G:Dump=". The way to perform such logging is Debug.log("message"). Printing to System.out is discouraged as it can interfere with the usage of System.out by the running Java application.
- thomas
On Feb 18, 2013, at 9:10 PM, lpxz <lpxz at ust.hk> wrote:
> Dear developers,
> I want to print the information of some structured graph in emitHIR() directly to the System.out.
> Therefore, I used "Debug.dump(graph, "name")", but it does not print the information that I want.
> I set the debug and debugsnippet options. The reason seems to be that "DebugScope.getInstance()"
> has an empty config instance and therefore lacks the dumpHandlers.
>
> I tried to copy the code in DebugEnvironment.initialize() to manually set the config, but seems there are cyclic project dependency:
> printer->Debug->printer.
>
> Could you give me some hints on achieving the goal. Also, I wonder if it is possible to print HIR directly to System.out.
> Are there any document explaining the options of graal?
>
> Regards
> Peng
>
More information about the graal-dev
mailing list