--- old/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2016-07-31 23:33:18.812297960 -0700 +++ new/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2016-07-31 23:33:18.749297775 -0700 @@ -417,7 +417,15 @@ #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 }