Skip to content

Commit

Permalink
Assert JavaThread::_last_freeze_fail_result is set
Browse files Browse the repository at this point in the history
  • Loading branch information
reinrich committed Nov 26, 2024
1 parent 723c1c1 commit 99e6240
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/hotspot/share/runtime/continuationFreezeThaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,15 @@ class Config {
using OopT = std::conditional_t<oops == oop_kind::NARROW, narrowOop, oop>;

static freeze_result freeze(JavaThread* thread, intptr_t* const sp) {
return freeze_internal<SelfT, false>(thread, sp);
freeze_result res = freeze_internal<SelfT, false>(thread, sp);
JFR_ONLY(assert((res == freeze_ok) || res == thread->last_freeze_fail_result(), "freeze failure not set"));
return res;
}

static freeze_result freeze_preempt(JavaThread* thread, intptr_t* const sp) {
return freeze_internal<SelfT, true>(thread, sp);
freeze_result res = freeze_internal<SelfT, true>(thread, sp);
JFR_ONLY(assert((res == freeze_ok) || res == thread->last_freeze_fail_result(), "freeze failure not set"));
return res;
}

static intptr_t* thaw(JavaThread* thread, Continuation::thaw_kind kind) {
Expand Down

0 comments on commit 99e6240

Please sign in to comment.