Browse files

vm: include native trampolines in stack traces

Signed-off-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information...
1 parent 043b91f commit 236c98248b01617e126a947bda48372aabe99a72 @tgrabiec tgrabiec committed with Mar 10, 2013
Showing with 8 additions and 3 deletions.
  1. +1 −1 include/vm/stack-trace.h
  2. +7 −2 test/functional/jvm/StackTraceTest.java
View
2 include/vm/stack-trace.h
@@ -99,9 +99,9 @@ enum stack_trace_elem_type {
STACK_TRACE_ELEM_TYPE_JIT,
STACK_TRACE_ELEM_TYPE_JNI,
STACK_TRACE_ELEM_TYPE_VM_NATIVE,
+ STACK_TRACE_ELEM_TYPE_TRAMPOLINE,
STACK_TRACE_ELEM_TYPE_OTHER, /* All values below this are java */
- STACK_TRACE_ELEM_TYPE_TRAMPOLINE,
};
struct stack_trace_elem {
View
9 test/functional/jvm/StackTraceTest.java
@@ -95,9 +95,14 @@ public static void testJNIUnsatisfiedLinkErrorStackTrace() {
}
assertNotNull(st);
- assertEquals(2, st.length);
+ assertEquals(3, st.length);
+
+ assertStackTraceElement(st[0], -1, null,
+ "jvm.StackTraceTest",
+ "nativeMethod",
+ true);
- assertStackTraceElement(st[0], 92, "StackTraceTest.java",
+ assertStackTraceElement(st[1], 92, "StackTraceTest.java",
"jvm.StackTraceTest",
"testJNIUnsatisfiedLinkErrorStackTrace",
false);

0 comments on commit 236c982

Please sign in to comment.