hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
changeset 40384 43db0d4b6e14
parent 40010 e32d5e545789
child 46792 1f9002906ea9
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp	Mon Aug 15 13:13:48 2016 -0700
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp	Mon Aug 15 13:14:08 2016 -0700
@@ -496,7 +496,15 @@
   __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