Skip to content

Commit

Permalink
8318383: Remove duplicated checks in os::get_native_stack() in posix …
Browse files Browse the repository at this point in the history
…implementation

Reviewed-by: dholmes, stuefe
  • Loading branch information
zhengyu123 committed Oct 19, 2023
1 parent defc7e0 commit 9cf334f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/hotspot/os/posix/os_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,10 @@ int os::get_native_stack(address* stack, int frames, int toSkip) {
stack[frame_idx ++] = fr.pc();
}
if (fr.fp() == nullptr || fr.cb() != nullptr ||
fr.sender_pc() == nullptr || os::is_first_C_frame(&fr)) break;

if (fr.sender_pc() && !os::is_first_C_frame(&fr)) {
fr = os::get_sender_for_C_frame(&fr);
} else {
fr.sender_pc() == nullptr || os::is_first_C_frame(&fr)) {
break;
}
fr = os::get_sender_for_C_frame(&fr);
}
num_of_frames = frame_idx;
for (; frame_idx < frames; frame_idx ++) {
Expand Down

0 comments on commit 9cf334f

Please sign in to comment.