Skip to content

Commit

Permalink
Fix stop-the-world race.
Browse files Browse the repository at this point in the history
Added a VMOp_ThirdPartyHeapOperation for the third-party heap to perform
stop-the-world GC.

SafepointSynchronize::begin() no longer report "thread has stopped" to
the third-party heap.  Instead the third-party heap should scan stacks
during stop-the-world.
  • Loading branch information
wks committed Sep 22, 2021
1 parent 425d410 commit a395aa6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/hotspot/share/runtime/safepoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ void SafepointSynchronize::begin() {
cur_state->examine_state_of_thread();
if (!cur_state->is_running()) {
still_running--;
Universe::heap()->report_java_thread_yield(cur);
// consider adjusting steps downward:
// steps = 0
// steps -= NNN
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/vmOperations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
template(PrintMetadata) \
template(GTestExecuteAtSafepoint) \
template(JFROldObject) \
template(ThirdPartyHeapOperation) \

class VM_Operation: public CHeapObj<mtInternal> {
public:
Expand Down

0 comments on commit a395aa6

Please sign in to comment.