Skip to content

Commit 6ba911d

Browse files
committed
8266498: Make debug ps() call print_stack
Reviewed-by: stuefe, lfoltan
1 parent ef0f693 commit 6ba911d

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/hotspot/share/utilities/debug.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -501,22 +501,18 @@ extern "C" JNIEXPORT void ps() { // print stack
501501
if (p->has_last_Java_frame()) {
502502
// If the last_Java_fp is set we are in C land and
503503
// can call the standard stack_trace function.
504-
#ifdef PRODUCT
505504
p->print_stack();
506-
} else {
507-
tty->print_cr("Cannot find the last Java frame, printing stack disabled.");
508-
#else // !PRODUCT
509-
p->trace_stack();
505+
#ifndef PRODUCT
506+
if (Verbose) p->trace_stack();
510507
} else {
511508
frame f = os::current_frame();
512509
RegisterMap reg_map(p);
513510
f = f.sender(&reg_map);
514511
tty->print("(guessing starting frame id=" PTR_FORMAT " based on current fp)\n", p2i(f.id()));
515512
p->trace_stack_from(vframe::new_vframe(&f, &reg_map, p));
516513
f.pd_ps();
517-
#endif // PRODUCT
514+
#endif
518515
}
519-
520516
}
521517

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

607-
// Another interface that isn't ambiguous in dbx.
608-
// Can we someday rename the other find to hsfind?
609-
extern "C" JNIEXPORT void hsfind(intptr_t x) {
610-
Command c("hsfind");
611-
os::print_location(tty, x, false);
612-
}
613-
614-
615603
extern "C" JNIEXPORT void find(intptr_t x) {
616604
Command c("find");
617605
os::print_location(tty, x, false);

0 commit comments

Comments
 (0)