--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Tue Mar 22 18:41:09 2016 -0700
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Wed Mar 23 23:36:29 2016 +0100
@@ -173,9 +173,6 @@
IRT_ENTRY(void, InterpreterRuntime::anewarray(JavaThread* thread, ConstantPool* pool, int index, jint size))
- // Note: no oopHandle for pool & klass needed since they are not used
- // anymore after new_objArray() and no GC can happen before.
- // (This may have to change if this code changes!)
Klass* klass = pool->klass_at(index, CHECK);
objArrayOop obj = oopFactory::new_objArray(klass, size, CHECK);
thread->set_vm_result(obj);
@@ -1414,3 +1411,17 @@
}
IRT_END
#endif // INCLUDE_JVMTI
+
+#ifndef PRODUCT
+// This must be a IRT_LEAF function because the interpreter must save registers on x86 to
+// call this, which changes rsp and makes the interpreter's expression stack not walkable.
+// The generated code still uses call_VM because that will set up the frame pointer for
+// bcp and method.
+IRT_LEAF(intptr_t, InterpreterRuntime::trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2))
+ const frame f = thread->last_frame();
+ assert(f.is_interpreted_frame(), "must be an interpreted frame");
+ methodHandle mh(thread, f.interpreter_frame_method());
+ BytecodeTracer::trace(mh, f.interpreter_frame_bcp(), tos, tos2);
+ return preserve_this_value;
+IRT_END
+#endif // !PRODUCT