Mercurial > hg > truffle
diff src/share/vm/runtime/frame.cpp @ 1119:547f81740344
6361589: Print out stack trace for target thread of GC crash
Summary: If GC crashed with java thread involved, print out the java stack trace in error report
Reviewed-by: never, ysr, coleenp, dholmes
author | minqi |
---|---|
date | Fri, 11 Dec 2009 11:09:49 -0800 |
parents | 148e5441d916 |
children | 9b9c1ee9b3f6 |
line wrap: on
line diff
--- a/src/share/vm/runtime/frame.cpp Wed Dec 02 20:32:27 2009 -0500 +++ b/src/share/vm/runtime/frame.cpp Fri Dec 11 11:09:49 2009 -0800 @@ -1190,9 +1190,19 @@ void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) { - if (is_interpreted_frame()) { oops_interpreted_do(f, map, use_interpreter_oop_map_cache); - } else if (is_entry_frame()) { oops_entry_do (f, map); - } else if (CodeCache::contains(pc())) { oops_code_blob_do (f, cf, map); +#ifndef PRODUCT + // simulate GC crash here to dump java thread in error report + if (CrashGCForDumpingJavaThread) { + char *t = NULL; + *t = 'c'; + } +#endif + if (is_interpreted_frame()) { + oops_interpreted_do(f, map, use_interpreter_oop_map_cache); + } else if (is_entry_frame()) { + oops_entry_do(f, map); + } else if (CodeCache::contains(pc())) { + oops_code_blob_do(f, cf, map); } else { ShouldNotReachHere(); }