A question on walking x86 frame stack

Gustavo Romero gromero at linux.vnet.ibm.com
Mon May 21 22:43:12 UTC 2018


Hi Yumin,

On 05/21/2018 06:59 PM, yumin qi wrote:
>    Yes, it displays the nearby stack values around the frame pointer.
>    Since FP used by JIT code, it may not be valid stack address. It is decided by the author to show 5 up/down around FP, 20 up/down around SP (in case FP not valid), no special meanings I think.

Got it! Thanks a lot for your reply.


Best regards,
Gustavo
  
> Thanks
> Yumin
> 
> 
> On Mon, May 21, 2018 at 9:14 AM, Gustavo Romero <gromero at linux.vnet.ibm.com <mailto:gromero at linux.vnet.ibm.com>> wrote:
> 
>     Hello,
> 
>     Does anybody know what's the reason behind the 5 "magic number" being add
>     (to FP) and subtracted (from SP) in this SA code for walking the stack
>     (lines 523 and 524):
> 
>     http://hg.openjdk.java.net/jdk/jdk/file/ec881a19d294/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java#l523 <http://hg.openjdk.java.net/jdk/jdk/file/ec881a19d294/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java#l523>
> 
>     I think it's just for providing more context / information on the adjacent
>     frames but I'm not sure... In that sense I'm wondering if the 5 fields up
>     and down the frame have any special meaning or are indeed only other
>     adjacent frames.
> 
> 
>     Thanks.
> 
>     Best regards,
>     Gustavo
> 
> 



More information about the hotspot-dev mailing list