Skip to content
Permalink
Browse files
8266498: Make debug ps() call print_stack
Reviewed-by: stuefe, lfoltan
  • Loading branch information
coleenp committed May 5, 2021
1 parent ef0f693 commit 6ba911d64ea05a6507bcf88a8ca656088a30ba5a
Showing with 3 additions and 15 deletions.
  1. +3 −15 src/hotspot/share/utilities/debug.cpp
@@ -501,22 +501,18 @@ extern "C" JNIEXPORT void ps() { // print stack
if (p->has_last_Java_frame()) {
// If the last_Java_fp is set we are in C land and
// can call the standard stack_trace function.
#ifdef PRODUCT
p->print_stack();
} else {
tty->print_cr("Cannot find the last Java frame, printing stack disabled.");
#else // !PRODUCT
p->trace_stack();
#ifndef PRODUCT
if (Verbose) p->trace_stack();
} else {
frame f = os::current_frame();
RegisterMap reg_map(p);
f = f.sender(&reg_map);
tty->print("(guessing starting frame id=" PTR_FORMAT " based on current fp)\n", p2i(f.id()));
p->trace_stack_from(vframe::new_vframe(&f, &reg_map, p));
f.pd_ps();
#endif // PRODUCT
#endif
}

}

extern "C" JNIEXPORT void pfl() {
@@ -604,14 +600,6 @@ extern "C" JNIEXPORT nmethod* findnm(intptr_t addr) {
return CodeCache::find_nmethod((address)addr);
}

// Another interface that isn't ambiguous in dbx.
// Can we someday rename the other find to hsfind?
extern "C" JNIEXPORT void hsfind(intptr_t x) {
Command c("hsfind");
os::print_location(tty, x, false);
}


extern "C" JNIEXPORT void find(intptr_t x) {
Command c("find");
os::print_location(tty, x, false);

0 comments on commit 6ba911d

Please sign in to comment.