Filtering the output of -XX:+PrintAssembly
Dennis Byrne
dennisbyrne at apache.org
Tue Nov 17 09:26:25 PST 2009
That was it. Thanks Christian. Any chance there is a way to skip the
hex and go with decimal? I'm guessing PrintAssemblyOptions is going
to be the answer. Is there any online documentation for these (and
all related) flags? My searches via Google aren't yielding much.
Dennis
On Tue, Nov 17, 2009 at 10:59 AM, Christian Thalinger
<Christian.Thalinger at sun.com> wrote:
> On Tue, 2009-11-17 at 10:52 -0600, Dennis Byrne wrote:
>> Thanks for your reply Christian. Unfortunately I get nothing when I
>> omit -XX:+PrintAssembly
>>
>> dbyrne at wud-nbyrne01:~/print_assembly/java$ javac HelloWorld.java
>> dbyrne at wud-nbyrne01:~/print_assembly/java$
>> /usr/lib/jvm/java-6-openjdk/jre/bin/java
>> -XX:+UnlockDiagnosticVMOptions
>> -XX:PrintAssemblyOptions=hsdis-print-bytes -Xbatch
>> -XX:CompileCommand=print,*HelloWorld.main HelloWorld
>> CompilerOracle: print *HelloWorld.main
>> 3331
>>
>> Here is the source code if it helps.
>>
>> class HelloWorld{
>> private static int i = 1;
>> private static int j = 22;
>>
>> public static void main(String[] args){
>> for(int j = 0; j < 10; j++){
>> i += 333;
>> }
>> System.out.println(i);
>> }
>> }
>
> The reason you don't get any output is because your main method doesn't
> get compiled. The loop is to short to trigger a compile. You can use
> -XX:+PrintCompilation to see what methods get compiled.
>
> -- Christian
>
>
--
Dennis Byrne
More information about the hotspot-dev
mailing list