6361589: Print out stack trace for target thread of GC crash

If GC crashed with java thread involved, print out the java stack trace in error report

Reviewed-by: never, ysr, coleenp, dholmes
This commit is contained in:
Yumin Qi 2009-12-11 11:09:49 -08:00
parent baf249687c
commit 4f656a451e
8 changed files with 74 additions and 9 deletions

View file

@ -1190,9 +1190,19 @@ void frame::oops_entry_do(OopClosure* f, const RegisterMap* map) {
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();
}