diff -r b756e7a2ec33 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_amd64/LinuxAMD64JavaThreadPDAccess.java
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_amd64/LinuxAMD64JavaThreadPDAccess.java	Thu Aug 03 18:56:57 2017 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_amd64/LinuxAMD64JavaThreadPDAccess.java	Thu Nov 22 12:08:51 2018 +0000
@@ -97,6 +97,12 @@
     }
     if (guesser.getPC() == null) {
       return new X86Frame(guesser.getSP(), guesser.getFP());
+    } else if (VM.getVM().getInterpreter().contains(guesser.getPC())) {
+      // pass the value of R13 which contains the bcp for the top level frame
+      Address r13 = context.getRegisterAsAddress(AMD64ThreadContext.R13);
+      X86Frame frame = new X86Frame(guesser.getSP(), guesser.getFP(), guesser.getPC());
+      frame.setR13(r13);
+      return frame;
     } else {
       return new X86Frame(guesser.getSP(), guesser.getFP(), guesser.getPC());
     }
diff -r b756e7a2ec33 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java	Thu Aug 03 18:56:57 2017 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java	Thu Nov 22 12:08:51 2018 +0000
@@ -96,6 +96,8 @@
   Address raw_fp; // frame pointer
   private Address raw_unextendedSP;
 
+  Address r13;
+
   private X86Frame() {
   }
 
@@ -173,6 +175,7 @@
     frame.raw_fp = raw_fp;
     frame.pc = pc;
     frame.deoptimized = deoptimized;
+    frame.r13 = r13;
     return frame;
   }
 
@@ -208,6 +211,10 @@
          ", pc: " + (pc == null? "null" : pc.toString());
   }
 
+  public void setR13(Address r13) {
+    this.r13 = r13;
+  }
+
   // accessors for the instance variables
   public Address getFP() { return raw_fp; }
   public Address getSP() { return raw_sp; }
@@ -433,6 +440,14 @@
     // for use in a non-debugging, or reflective, system. Need to
     // figure out how to express this.
     Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0);
+
+    // If we are in the top level frame then R13 may have been set for us which contains
+    // the BCP. If so then let it take priority. If we are in a top level interpreter frame,
+    // the BCP is live in R13 (on x86) and not saved in the BCX stack slot.
+    if (r13 != null) {
+        bcp = r13;
+    }
+
     Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0);
     Method method = (Method)Metadata.instantiateWrapperFor(methodHandle);
     return bcpToBci(bcp, method);
