How to inspect hotspot compiler results? hsdis binaries for Windows?

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Thu Nov 19 15:43:33 PST 2009


Ulf Zibis wrote:
> Thanks for the hint.
> Now I tried:
> -XX:CompileCommand=print,sun.nio.cs.ext.EUC_TW_C_d_b_codeToBuffer4.Decoder::decode 
> 
> I don't return an error, but either I don't get any compile output.

Add -XX:+PrintCompilation, it may be not compiled yet.
You can try to lower compilation threshold (the default for server is 10000):
-XX:CompileThreshold=1000

> 
> -Xcomp
> What is this ? There is no docu on 
> jdk1.7.0/docs/technotes/tools/windows/java.html

We use it for stress testing out JIT compiler when all called methods
are immediately compiled without reaching threshold.
Note: the program execution will be very slow and generated code
for compiled methods could be very different from normal execution
since no profiling information is collected for executed bytecode.

Vladimir

> 
> -Ulf
> 
> 
> 
> Am 19.11.2009 19:37, Vladimir Kozlov schrieb:
>> Separate method name by "::" instead of ".":
>>
>> ::decodeArrayLoop
>>
>> And, it seems, we have bug here since it can't parse the class
>> name with more then one dot without specified method name:
>>
>> % gamma -XX:CompileCommand=print,sun.nio.cs -Xcomp t
>> VM option 'CompileCommand=print,sun.nio.cs'
>> CompilerOracle: unrecognized line
>>   "print sun nio cs"
>>   Unrecognized text after command:  cs
>>
>> Vladimir
>>
>> Ulf Zibis wrote:
>>> Vladimir, thanks for your answer.
>>>
>>> I tried:
>>> -XX:CompileCommand=print,sun.nio.cs.ext.EUC_TW_C_d_b_codeToBuffer4.Decoder.decodeArrayLoop 
>>>
>>>
>>> ... but got:
>>> CompilerOracle: unrecognized line
>>> VM option 
>>> 'CompileCommand=print,sun.nio.cs.ext.EUC_TW_C_d_b_codeToBuffer4.Decoder.decodeArrayLoop' 
>>>
>>>  "print sun nio cs ext EUC_TW_C_d_b_codeToBuffer4 Decoder 
>>> decodeArrayLoop"
>>>  Unrecognized text after command:  cs ext EUC_TW_C_d_b_codeToBuffer4 
>>> Decoder decodeArrayLoop
>>>
>>>
>>> java.vm.version : 17.0-b05-fastdebug
>>>
>>> -Ulf
>>>
>>>
>>> Am 19.11.2009 18:58, Vladimir Kozlov schrieb:
>>>> Don't use '*' in class name if you want to look on one
>>>> particular class. You correctly used CompileCommand=print but
>>>> don't specify PrintOptoAssembly if you want to print only one method.
>>>>
>>>> Vladimir
>>>>
>>>> Ulf Zibis wrote:
>>>>> Yes,  "-XX:+PrintOptoAssembly" option works on Windows too (using 
>>>>> fastdebug-build). :-)
>>>>> Now I get very loooong output, so next question is, how to reduce 
>>>>> the output to a single method???
>>>>> I've tried "-XX:CompileCommand=print,*...", but as expected, it was 
>>>>> ignored.
>>>>> When "-Xbatch" is needed?
>>>>>
>>>>> BTW, there is no docu for "-XX:+PrintOptoAssembly" on 
>>>>> http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
>>>>>
>>>>> -Ulf
>>>>>
>>>>>
>>>>>
>>>>> Am 18.11.2009 18:13, Dennis Byrne schrieb:
>>>>>> It works on Windows but it is not quite as low level as 
>>>>>> PrintAssembly.
>>>>>>  For example you will see things like "fastlock" or "MEMBAR-release"
>>>>>> but not the actual instructions behind these operations.
>>>>>>
>>>>>> Dennis Byrne
>>>>>>
>>>>>> On Wed, Nov 18, 2009 at 10:56 AM, Clemens Eisserer 
>>>>>> <linuxhippy at gmail.com> wrote:
>>>>>>  
>>>>>>> Hi Ulf,
>>>>>>>
>>>>>>> As far as I know the fastdebug-builds support this right out of the
>>>>>>> box, it can be enabled using the  "-XX:+PrintOptoAssembly" option.
>>>>>>> However I don't know wether this works on Windows too.
>>>>>>>
>>>>>>> - Clemens
>>>>>>>
>>>>>>> 2009/11/18 Ulf Zibis <Ulf.Zibis at gmx.de>:
>>>>>>>  
>>>>>>>> Am 18.11.2009 10:21, Christian Thalinger schrieb:
>>>>>>>>  
>>>>>>>>> I could upload plugins for Linux and Solaris (both 32 and 
>>>>>>>>> 64-bit) based
>>>>>>>>> on binutils-2.19.1.  I actually never tried base-hsdis.
>>>>>>>>>
>>>>>>>>>         
>>>>>>>> Would be great!
>>>>>>>>
>>>>>>>> Any volunteer to build the windows plugin ?
>>>>>>>> (I not experienced in GNU build environment on Windows and don't 
>>>>>>>> possess MS
>>>>>>>> Visual Studio 2008 enterprise licence)
>>>>>>>> Maybe by help of mingw cross compiler on linux.
>>>>>>>>
>>>>>>>> Would be extremely great!!!
>>>>>>>>
>>>>>>>>
>>>>>>>>  
>>>>>>>>> Please, feel free to edit the wiki page for clarity or to fill 
>>>>>>>>> in missing
>>>>>>>>> information.
>>>>>>>>>         
>>>>>>>> Done.
>>>>>>>>
>>>>>>>> -Ulf
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>       
>>>>>>
>>>>>>
>>>>>>
>>>>>>   
>>>>>
>>>>
>>>>
>>>
>>
>>
> 


More information about the hotspot-dev mailing list