PrintCFGToFile jvm option.. where to find a file printed?

Krystal Mok rednaxelafx at gmail.com
Tue Feb 14 05:01:16 PST 2012


Hi Maxym,

+1 with Christian. If you're running OpenJDK 7 on 64-bit Ubuntu, you're
probably using only the server compiler (C2) instead of the client compiler
(C1). PrintCFGToFile is only for C1.
You might want to turn on -XX:+TieredCompilation if you really want to see
this flag working, on you're current platform.

- Kris

On Tue, Feb 14, 2012 at 8:45 PM, Christian Thalinger <
christian.thalinger at oracle.com> wrote:

>
> On Feb 14, 2012, at 1:25 PM, Maxym Pendyshchuk wrote:
>
> I made a debug build of OPENJDK 7.0.2 (for Ubuntu 11.10 OS, if matters).
> Now I want to see a control flow graph information, I run a command:
>
> java -XX:+PrintCFGToFile Test
>
> in console I get "VM option '+PrintCFGToFile'", but no file is created...
> In CFGPrinter (if I'm not wrong with class), I see that file has name
> output.cfg, I looked for such a file on the file system, but didn't find
> it. Do I miss additional options? In documentation I saw examples only with
> one option... Is it a bug, or I do something wrong? Thank you for any
> information..
>
>
> It works for me:
>
> $ java -XX:+PrintCompilation -XX:+PrintCFGToFile -version
>     718    1       3       java.lang.String::equals (88 bytes)
> openjdk version "1.7.0-ea"
> OpenJDK Runtime Environment (build 1.7.0-ea-b221)
> OpenJDK 64-Bit Server VM (build 23.0-b15-internal-jvmg, mixed mode)
> $ cat output.cfg
> begin_compilation
>   name " java.lang.String::equals"
>   method "virtual jboolean java.lang.String.equals(jobject)"
>   date 1329223300664
> end_compilation
> begin_cfg
>   name "BlockListBuilder virtual jboolean java.lang.String.equals(jobject)"
>   begin_block
>     name "B0"
>     from_bci 0
>     to_bci -1
>     predecessors
>     successors "B1" "B2"
>     xhandlers
>     flags "std"
>   end_block
> <snip>
>
> Are you actually using C1?
>
> -- Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20120214/33b14ddd/attachment.html 


More information about the hotspot-dev mailing list