-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8369238: Allow virtual thread preemption on some common class initialization paths #27802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
60cbca4
88844bf
d035366
79fce80
ac55715
9f4436a
30bdf49
6882db0
6000edb
a943c83
0e483ba
2786b1d
bea5620
1312486
3bf8ebd
4cecd7e
c7d6f5c
ffcd92a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,7 +196,7 @@ static bool do_verify_after_thaw(JavaThread* thread, stackChunkOop chunk, output | |
| static void log_frames(JavaThread* thread, bool dolog = true); | ||
| static void log_frames_after_thaw(JavaThread* thread, ContinuationWrapper& cont, intptr_t* sp); | ||
| static void print_frame_layout(const frame& f, bool callee_complete, outputStream* st = tty); | ||
| static void verify_frame_kind(const frame& top, Continuation::preempt_kind preempt_kind, Method** m_ptr = nullptr, const char** code_name_ptr = nullptr, int* bci_ptr = nullptr); | ||
| static void verify_frame_kind(frame& top, Continuation::preempt_kind preempt_kind, Method** m_ptr = nullptr, const char** code_name_ptr = nullptr, int* bci_ptr = nullptr, stackChunkOop chunk = nullptr); | ||
|
|
||
| #define assert_pfl(p, ...) \ | ||
| do { \ | ||
|
|
@@ -1723,7 +1723,7 @@ bool FreezeBase::check_valid_fast_path() { | |
| return true; | ||
| } | ||
|
|
||
| static void verify_frame_kind(const frame& top, Continuation::preempt_kind preempt_kind, Method** m_ptr, const char** code_name_ptr, int* bci_ptr) { | ||
| static void verify_frame_kind(frame& top, Continuation::preempt_kind preempt_kind, Method** m_ptr, const char** code_name_ptr, int* bci_ptr, stackChunkOop chunk) { | ||
| Method* m; | ||
| const char* code_name; | ||
| int bci; | ||
|
|
@@ -1747,7 +1747,13 @@ static void verify_frame_kind(const frame& top, Continuation::preempt_kind preem | |
| RegisterMap reg_map(current, | ||
| RegisterMap::UpdateMap::skip, | ||
| RegisterMap::ProcessFrames::skip, | ||
| RegisterMap::WalkContinuation::skip); | ||
| RegisterMap::WalkContinuation::include); | ||
| if (top.is_heap_frame()) { | ||
| assert(chunk != nullptr, ""); | ||
| reg_map.set_stack_chunk(chunk); | ||
| top = chunk->relativize(top); | ||
| top.set_frame_index(0); | ||
| } | ||
| frame fr = top.sender(®_map); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there's a problem here. I get an assertion on ppc if I think in It's not quite easy to fix though since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, it should be walked as a heap frame. Could you verify if this patch fixes the issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your patch fixes the issue. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great, pushed fix. |
||
| vframe* vf = vframe::new_vframe(&fr, ®_map, current); | ||
| compiledVFrame* cvf = compiledVFrame::cast(vf); | ||
|
|
@@ -1803,7 +1809,7 @@ static void log_preempt_after_freeze(ContinuationWrapper& cont) { | |
| Method* m = nullptr; | ||
| const char* code_name = nullptr; | ||
| int bci = InvalidFrameStateBci; | ||
| verify_frame_kind(top_frame, pk, &m, &code_name, &bci); | ||
| verify_frame_kind(top_frame, pk, &m, &code_name, &bci, cont.tail()); | ||
| assert(m != nullptr && code_name != nullptr && bci != InvalidFrameStateBci, "should be set"); | ||
|
|
||
| ResourceMark rm(current); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it altogether. I used it during debugging when I wanted to disable all frame logging except from certain places. But it's not really needed.