Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/thread.cpp @ 3336:2e038ad0c1d0
7009361: JSR 292 Invalid value on stack on solaris-sparc with -Xcomp
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Mon, 02 May 2011 18:53:37 -0700 |
parents | 38fea01eb669 |
children | f52ed367b66d |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp Mon May 02 10:51:36 2011 -0700 +++ b/src/share/vm/runtime/thread.cpp Mon May 02 18:53:37 2011 -0700 @@ -31,6 +31,7 @@ #include "compiler/compileBroker.hpp" #include "interpreter/interpreter.hpp" #include "interpreter/linkResolver.hpp" +#include "interpreter/oopMapCache.hpp" #include "jvmtifiles/jvmtiEnv.hpp" #include "memory/oopFactory.hpp" #include "memory/universe.inline.hpp" @@ -2860,6 +2861,25 @@ } +// Print or validate the layout of stack frames +void JavaThread::print_frame_layout(int depth, bool validate_only) { + ResourceMark rm; + PRESERVE_EXCEPTION_MARK; + FrameValues values; + int frame_no = 0; + for(StackFrameStream fst(this, false); !fst.is_done(); fst.next()) { + fst.current()->describe(values, ++frame_no); + if (depth == frame_no) break; + } + if (validate_only) { + values.validate(); + } else { + tty->print_cr("[Describe stack layout]"); + values.print(); + } +} + + void JavaThread::trace_stack_from(vframe* start_vf) { ResourceMark rm; int vframe_no = 1;