Newbie hsdis questions

Ulf Zibis Ulf.Zibis at gmx.de
Tue Dec 1 08:28:56 PST 2009


See thread "Filtering the output of -XX:+PrintAssembly" 17.11.2009 17:24
and "How to inspect hotspot compiler results? ..." especially 20.11.2009 
21:01 and 23.11.2009 19:15 (all times CET ;-)  )

-Ulf


Am 01.12.2009 17:08, Ben Evans schrieb:
>
> Hi,
>
> I have some newbie questions about the output of the HS disassembler. 
> It's possible that some of these are really more general x86-64 
> assembler questions, and if so, a pointer to a good reference would be 
> much appreciated.
>
> I'm running 6u18-b05 on x64 with these options:  -XX:+PrintCompilation 
> -XX:+PrintAssembly -XX:+PrintSignatureHandlers -XX:+PrintNMethods
>
> Here's a chunk of output I'm interested in:
>
> 384115 Compiled (c2) 496   nmethod com.db.e.d.m.p.TP::doExecute (833 
> bytes)
>  384116  total in heap  [0x00007fc3911f2a50,0x00007fc391208120] = 87760
>  384117  relocation     [0x00007fc3911f2b58,0x00007fc3911f3630] = 2776
>  384118  main code      [0x00007fc3911f3640,0x00007fc3911fc140] = 35584
>  384119  stub code      [0x00007fc3911fc140,0x00007fc3911fc6c7] = 1415
>  384120  constants      [0x00007fc3911fc6c7,0x00007fc3911fc6c8] = 1
>  384121  scopes data    [0x00007fc3911fc6c8,0x00007fc391205598] = 36560
>  384122  scopes pcs     [0x00007fc391205598,0x00007fc391206948] = 5040
>  384123  dependencies   [0x00007fc391206948,0x00007fc3912069d0] = 136
>  384124  handler table  [0x00007fc3912069d0,0x00007fc391207a68] = 4248
>  384125  nul chk table  [0x00007fc391207a68,0x00007fc391207e08] = 928
>  384126  oops           [0x00007fc391207e08,0x00007fc391208120] = 792
>  384127 Decoding compiled method 0x00007fc3911f2a50:
>  384128 Code:
>  384129 [Disassembling for mach='i386:x86-64']
>  384130 [Entry Point]
>  384131   0x00007fc3911f3640: cmp    0x8(%rsi),%rax
>  384132   0x00007fc3911f3644: jne    0x00007fc3910405e0  ;   
> {runtime_call}
>  384133   0x00007fc3911f364a: xchg   %ax,%ax
>  384134   0x00007fc3911f364c: nopl   0x0(%rax)
>  384135 [Verified Entry Point]
>  384136   0x00007fc3911f3650: mov    %eax,-0x6000(%rsp)
>  384137   0x00007fc3911f3657: push   %rbp
>
> First of, I'm assuming that the proximity of line 384115 to line 
> 384116 is a guarantee that the 2 lines are referring to the 
> compilation of the same method, and that what follows is all about 
> com.db.e.d.m.p.TP::doExecute. If not, how do I map back from an 
> address to a nmethod name?
>
> Main questions:
>
> 1) What do the entries in the table in lines 384116-384126 represent?
> 2) Lines 384131-384134 are presumably the x64 representation of a 
> monomorphic call guard. Why are the xchg and nopl instructions (which 
> are surely both effectively no-ops) present?
> 3) The addresses for lines 384131-384134 look strange to me, eg why 
> isn't there at least 8 bytes required for the jne instruction? Is 
> there a good reference for instruction lengths somewhere?
>
> I have some questions which are more pertinent to my actual perf 
> anomaly, but I want to make sure I understand the basics fully, and do 
> my own investigations first - and try to conserve the group's time.
>
> Thanks,
>
> Ben
> -- 
> Ben Evans
> eFX Algorithmic Trading
> Deutsche Bank, London
> Office: +44 (0)20 7541 3953
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If 
> you are not the intended recipient (or have received this e-mail in 
> error) please notify the sender immediately and delete this e-mail. 
> Any unauthorized copying, disclosure or distribution of the material 
> in this e-mail is strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for 
> additional EU corporate and regulatory disclosures.



More information about the hotspot-dev mailing list