8314020: Print instruction blocks in byte units

Reviewed-by: stuefe, fyang
This commit is contained in:
Aleksey Shipilev 2023-08-16 07:02:48 +00:00
parent 0b12480de8
commit a602624ef4
12 changed files with 12 additions and 12 deletions

View File

@ -463,7 +463,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, /*instrsize=*/4); print_instructions(st, pc);
st->cr(); st->cr();
// Try to decode the instructions. // Try to decode the instructions.

View File

@ -477,7 +477,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, 4/*native instruction size*/); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -854,7 +854,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, sizeof(char)); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -355,7 +355,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::fetch_frame_from_context(uc).pc(); address pc = os::fetch_frame_from_context(uc).pc();
print_instructions(st, pc, 4/*native instruction size*/); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -483,7 +483,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, Assembler::InstructionSize); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -477,7 +477,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, /*instrsize=*/4); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -367,7 +367,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::fetch_frame_from_context(uc).pc(); address pc = os::fetch_frame_from_context(uc).pc();
print_instructions(st, pc, UseRVC ? sizeof(char) : (int)NativeInstruction::instruction_size); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -456,7 +456,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, /*intrsize=*/4); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -571,7 +571,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::fetch_frame_from_context(uc).pc(); address pc = os::fetch_frame_from_context(uc).pc();
print_instructions(st, pc, sizeof(char)); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -409,7 +409,7 @@ void os::print_tos_pc(outputStream *st, const void* ucVoid) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::Posix::ucontext_get_pc(uc); address pc = os::Posix::ucontext_get_pc(uc);
print_instructions(st, pc, sizeof(char)); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -469,7 +469,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
// point to garbage if entry point in an nmethod is corrupted. Leave // point to garbage if entry point in an nmethod is corrupted. Leave
// this at the end, and hope for the best. // this at the end, and hope for the best.
address pc = os::fetch_frame_from_context(uc).pc(); address pc = os::fetch_frame_from_context(uc).pc();
print_instructions(st, pc, sizeof(char)); print_instructions(st, pc);
st->cr(); st->cr();
} }

View File

@ -772,7 +772,7 @@ class os: AllStatic {
static void print_context(outputStream* st, const void* context); static void print_context(outputStream* st, const void* context);
static void print_tos_pc(outputStream* st, const void* context); static void print_tos_pc(outputStream* st, const void* context);
static void print_tos(outputStream* st, address sp); static void print_tos(outputStream* st, address sp);
static void print_instructions(outputStream* st, address pc, int unitsize); static void print_instructions(outputStream* st, address pc, int unitsize = 1);
static void print_register_info(outputStream* st, const void* context, int& continuation); static void print_register_info(outputStream* st, const void* context, int& continuation);
static void print_register_info(outputStream* st, const void* context); static void print_register_info(outputStream* st, const void* context);
static bool signal_sent_by_kill(const void* siginfo); static bool signal_sent_by_kill(const void* siginfo);