8133740: NMT for Linux/x86/x64 and bsd/x64 slowdebug builds includes NativeCallStack::NativeCallStack() frame in backtrace
Skip an extra frame in _get_previous_fp() when it is not inlined. Reviewed-by: dholmes, zgu
This commit is contained in:
parent
eabe746ff6
commit
e3c3a54f7a
hotspot/src/os_cpu
@ -417,7 +417,15 @@ intptr_t* _get_previous_fp() {
|
||||
#else
|
||||
register intptr_t **ebp __asm__ (SPELL_REG_FP);
|
||||
#endif
|
||||
return (intptr_t*) *ebp; // we want what it points to.
|
||||
// ebp is for this frame (_get_previous_fp). We want the ebp for the
|
||||
// caller of os::current_frame*(), so go up two frames. However, for
|
||||
// optimized builds, _get_previous_fp() will be inlined, so only go
|
||||
// up 1 frame in that case.
|
||||
#ifdef _NMT_NOINLINE_
|
||||
return **(intptr_t***)ebp;
|
||||
#else
|
||||
return *ebp;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -235,7 +235,15 @@ intptr_t* _get_previous_fp() {
|
||||
#else
|
||||
register intptr_t **ebp __asm__ (SPELL_REG_FP);
|
||||
#endif
|
||||
return (intptr_t*) *ebp; // we want what it points to.
|
||||
// ebp is for this frame (_get_previous_fp). We want the ebp for the
|
||||
// caller of os::current_frame*(), so go up two frames. However, for
|
||||
// optimized builds, _get_previous_fp() will be inlined, so only go
|
||||
// up 1 frame in that case.
|
||||
#ifdef _NMT_NOINLINE_
|
||||
return **(intptr_t***)ebp;
|
||||
#else
|
||||
return *ebp;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -496,7 +496,15 @@ intptr_t* _get_previous_fp() {
|
||||
__asm {
|
||||
mov frameptr, ebp
|
||||
};
|
||||
// ebp (frameptr) is for this frame (_get_previous_fp). We want the ebp for the
|
||||
// caller of os::current_frame*(), so go up two frames. However, for
|
||||
// optimized builds, _get_previous_fp() will be inlined, so only go
|
||||
// up 1 frame in that case.
|
||||
#ifdef _NMT_NOINLINE_
|
||||
return **(intptr_t***)frameptr;
|
||||
#else
|
||||
return *frameptr;
|
||||
#endif
|
||||
}
|
||||
#endif // !AMD64
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user