Skip to content

Commit a602624

Browse files
committedAug 16, 2023
8314020: Print instruction blocks in byte units
Reviewed-by: stuefe, fyang
1 parent 0b12480 commit a602624

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed
 

‎src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
463463
// point to garbage if entry point in an nmethod is corrupted. Leave
464464
// this at the end, and hope for the best.
465465
address pc = os::Posix::ucontext_get_pc(uc);
466-
print_instructions(st, pc, /*instrsize=*/4);
466+
print_instructions(st, pc);
467467
st->cr();
468468

469469
// Try to decode the instructions.

‎src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp

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

‎src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp

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

‎src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp

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

‎src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp

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

‎src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp

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

‎src/hotspot/os_cpu/linux_riscv/os_linux_riscv.cpp

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

‎src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp

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

‎src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
571571
// point to garbage if entry point in an nmethod is corrupted. Leave
572572
// this at the end, and hope for the best.
573573
address pc = os::fetch_frame_from_context(uc).pc();
574-
print_instructions(st, pc, sizeof(char));
574+
print_instructions(st, pc);
575575
st->cr();
576576
}
577577

‎src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp

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

‎src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ void os::print_tos_pc(outputStream *st, const void *context) {
469469
// point to garbage if entry point in an nmethod is corrupted. Leave
470470
// this at the end, and hope for the best.
471471
address pc = os::fetch_frame_from_context(uc).pc();
472-
print_instructions(st, pc, sizeof(char));
472+
print_instructions(st, pc);
473473
st->cr();
474474
}
475475

‎src/hotspot/share/runtime/os.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ class os: AllStatic {
772772
static void print_context(outputStream* st, const void* context);
773773
static void print_tos_pc(outputStream* st, const void* context);
774774
static void print_tos(outputStream* st, address sp);
775-
static void print_instructions(outputStream* st, address pc, int unitsize);
775+
static void print_instructions(outputStream* st, address pc, int unitsize = 1);
776776
static void print_register_info(outputStream* st, const void* context, int& continuation);
777777
static void print_register_info(outputStream* st, const void* context);
778778
static bool signal_sent_by_kill(const void* siginfo);

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Aug 16, 2023

@openjdk-notifier[bot]
Please sign in to comment.