Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,6 @@ static void fill_continuation_entry(MacroAssembler* masm, Register reg_cont_obj,
assert_different_registers(reg_cont_obj, reg_flags);
Register zero = R8_ARG6;
Register tmp2 = R9_ARG7;
Register tmp3 = R10_ARG8;

DEBUG_ONLY(__ block_comment("fill {"));
#ifdef ASSERT
Expand Down Expand Up @@ -1678,7 +1677,6 @@ static void fill_continuation_entry(MacroAssembler* masm, Register reg_cont_obj,
static void continuation_enter_cleanup(MacroAssembler* masm) {
Register tmp1 = R8_ARG6;
Register tmp2 = R9_ARG7;
Register tmp3 = R10_ARG8;

#ifdef ASSERT
__ block_comment("clean {");
Expand All @@ -1689,8 +1687,8 @@ static void continuation_enter_cleanup(MacroAssembler* masm) {

__ ld_ptr(tmp1, ContinuationEntry::parent_cont_fastpath_offset(), R1_SP);
__ st_ptr(tmp1, JavaThread::cont_fastpath_offset(), R16_thread);
__ ld_ptr(tmp3, ContinuationEntry::parent_offset(), R1_SP);
__ st_ptr(tmp3, JavaThread::cont_entry_offset(), R16_thread);
__ ld_ptr(tmp2, ContinuationEntry::parent_offset(), R1_SP);
__ st_ptr(tmp2, JavaThread::cont_entry_offset(), R16_thread);
DEBUG_ONLY(__ block_comment("} clean"));
}

Expand Down
9 changes: 4 additions & 5 deletions src/hotspot/share/runtime/continuation.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -53,10 +53,9 @@ enum freeze_result {
freeze_ok_bottom = 1,
freeze_pinned_cs = 2,
freeze_pinned_native = 3,
freeze_pinned_monitor = 4,
freeze_exception = 5,
freeze_not_mounted = 6,
freeze_unsupported = 7
freeze_exception = 4,
freeze_not_mounted = 5,
freeze_unsupported = 6
};

class Continuation : AllStatic {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/continuationFreezeThaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ static inline freeze_result freeze_internal(JavaThread* current, intptr_t* const
if (entry->is_pinned()) {
log_develop_debug(continuations)("PINNED due to critical section");
verify_continuation(cont.continuation());
freeze_result res = entry->is_pinned() ? freeze_pinned_cs : freeze_pinned_monitor;
const freeze_result res = freeze_pinned_cs;
if (!preempt) {
JFR_ONLY(current->set_last_freeze_fail_result(res);)
}
Expand Down
9 changes: 3 additions & 6 deletions src/java.base/share/classes/jdk/internal/vm/Continuation.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -57,7 +57,6 @@ public class Continuation {
/** Reason for pinning */
public enum Pinned {
/** Native frame on stack */ NATIVE,
/** Monitor held */ MONITOR,
/** In critical section */ CRITICAL_SECTION,
/** Exception (OOME/SOE) */ EXCEPTION
}
Expand All @@ -69,8 +68,7 @@ public enum PreemptStatus {
/** Permanent failure: continuation already yielding */ PERM_FAIL_YIELDING(null),
/** Permanent failure: continuation not mounted on the thread */ PERM_FAIL_NOT_MOUNTED(null),
/** Transient failure: continuation pinned due to a held CS */ TRANSIENT_FAIL_PINNED_CRITICAL_SECTION(Pinned.CRITICAL_SECTION),
/** Transient failure: continuation pinned due to native frame */ TRANSIENT_FAIL_PINNED_NATIVE(Pinned.NATIVE),
/** Transient failure: continuation pinned due to a held monitor */ TRANSIENT_FAIL_PINNED_MONITOR(Pinned.MONITOR);
/** Transient failure: continuation pinned due to native frame */ TRANSIENT_FAIL_PINNED_NATIVE(Pinned.NATIVE);

final Pinned pinned;
private PreemptStatus(Pinned reason) { this.pinned = reason; }
Expand All @@ -85,8 +83,7 @@ private static Pinned pinnedReason(int reason) {
return switch (reason) {
case 2 -> Pinned.CRITICAL_SECTION;
case 3 -> Pinned.NATIVE;
case 4 -> Pinned.MONITOR;
case 5 -> Pinned.EXCEPTION;
case 4 -> Pinned.EXCEPTION;
default -> throw new AssertionError("Unknown pinned reason: " + reason);
};
}
Expand Down