提交 52003df5 编写于 作者: C cjplummer

8133740: NMT for Linux/x86/x64 and bsd/x64 slowdebug builds includes...

8133740: NMT for Linux/x86/x64 and bsd/x64 slowdebug builds includes NativeCallStack::NativeCallStack() frame in backtrace
Summary: Skip an extra frame in _get_previous_fp() when it is not inlined.
Reviewed-by: dholmes, zgu
上级 49749006
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册