mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8044735: Print format/argument warnings
Reviewed-by: twisti, kvn
This commit is contained in:
parent
f19a510532
commit
baadb75921
3 changed files with 17 additions and 13 deletions
|
@ -42,20 +42,24 @@ void pd_ps(frame f) {
|
||||||
intptr_t *pc = NULL;
|
intptr_t *pc = NULL;
|
||||||
intptr_t *next_pc = NULL;
|
intptr_t *next_pc = NULL;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
tty->print("register window backtrace from %#x:\n", sp);
|
tty->print_cr("register window backtrace from " INTPTR_FORMAT ":", p2i(sp));
|
||||||
while (sp != NULL && ((intptr_t)sp & 7) == 0 && sp > prev_sp && sp < prev_sp+1000) {
|
while (sp != NULL && ((intptr_t)sp & 7) == 0 && sp > prev_sp && sp < prev_sp+1000) {
|
||||||
pc = next_pc;
|
pc = next_pc;
|
||||||
next_pc = (intptr_t*) sp[I7->sp_offset_in_saved_window()];
|
next_pc = (intptr_t*) sp[I7->sp_offset_in_saved_window()];
|
||||||
tty->print("[%d] sp=%#x pc=", count, sp);
|
tty->print("[%d] sp=" INTPTR_FORMAT " pc=", count, p2i(sp));
|
||||||
findpc((intptr_t)pc);
|
findpc((intptr_t)pc);
|
||||||
if (WizardMode && Verbose) {
|
if (WizardMode && Verbose) {
|
||||||
// print register window contents also
|
// print register window contents also
|
||||||
tty->print_cr(" L0..L7: {%#x %#x %#x %#x %#x %#x %#x %#x}",
|
tty->print_cr(" L0..L7: {"
|
||||||
sp[0+0],sp[0+1],sp[0+2],sp[0+3],
|
INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " "
|
||||||
sp[0+4],sp[0+5],sp[0+6],sp[0+7]);
|
INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " ",
|
||||||
tty->print_cr(" I0..I7: {%#x %#x %#x %#x %#x %#x %#x %#x}",
|
sp[0+0], sp[0+1], sp[0+2], sp[0+3],
|
||||||
sp[8+0],sp[8+1],sp[8+2],sp[8+3],
|
sp[0+4], sp[0+5], sp[0+6], sp[0+7]);
|
||||||
sp[8+4],sp[8+5],sp[8+6],sp[8+7]);
|
tty->print_cr(" I0..I7: {"
|
||||||
|
INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " "
|
||||||
|
INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " " INTPTR_FORMAT " ",
|
||||||
|
sp[8+0], sp[8+1], sp[8+2], sp[8+3],
|
||||||
|
sp[8+4], sp[8+5], sp[8+6], sp[8+7]);
|
||||||
// (and print stack frame contents too??)
|
// (and print stack frame contents too??)
|
||||||
|
|
||||||
CodeBlob *b = CodeCache::find_blob((address) pc);
|
CodeBlob *b = CodeCache::find_blob((address) pc);
|
||||||
|
@ -74,7 +78,7 @@ void pd_ps(frame f) {
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
if (sp != NULL)
|
if (sp != NULL)
|
||||||
tty->print("[%d] sp=%#x [bogus sp!]", count, sp);
|
tty->print("[%d] sp=" INTPTR_FORMAT " [bogus sp!]", count, p2i(sp));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PRODUCT
|
#endif // PRODUCT
|
||||||
|
|
|
@ -483,7 +483,7 @@ void trace_method_handle_stub(const char* adaptername,
|
||||||
const char* mh_reg_name = has_mh ? "G3_mh" : "G3";
|
const char* mh_reg_name = has_mh ? "G3_mh" : "G3";
|
||||||
tty->print_cr("MH %s %s="INTPTR_FORMAT " saved_sp=" INTPTR_FORMAT " args=" INTPTR_FORMAT,
|
tty->print_cr("MH %s %s="INTPTR_FORMAT " saved_sp=" INTPTR_FORMAT " args=" INTPTR_FORMAT,
|
||||||
adaptername, mh_reg_name,
|
adaptername, mh_reg_name,
|
||||||
(intptr_t) mh, saved_sp, args);
|
p2i(mh), p2i(saved_sp), p2i(args));
|
||||||
|
|
||||||
if (Verbose) {
|
if (Verbose) {
|
||||||
// dumping last frame with frame::describe
|
// dumping last frame with frame::describe
|
||||||
|
|
|
@ -1206,10 +1206,10 @@ void MachPrologNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Assembler::is_simm13(-framesize)) {
|
if (Assembler::is_simm13(-framesize)) {
|
||||||
st->print ("SAVE R_SP,-%d,R_SP",framesize);
|
st->print ("SAVE R_SP,-" SIZE_FORMAT ",R_SP",framesize);
|
||||||
} else {
|
} else {
|
||||||
st->print_cr("SETHI R_SP,hi%%(-%d),R_G3",framesize); st->print("\t");
|
st->print_cr("SETHI R_SP,hi%%(-" SIZE_FORMAT "),R_G3",framesize); st->print("\t");
|
||||||
st->print_cr("ADD R_G3,lo%%(-%d),R_G3",framesize); st->print("\t");
|
st->print_cr("ADD R_G3,lo%%(-" SIZE_FORMAT "),R_G3",framesize); st->print("\t");
|
||||||
st->print ("SAVE R_SP,R_G3,R_SP");
|
st->print ("SAVE R_SP,R_G3,R_SP");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue