Skip to content
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

Fix 0.42 to have correct M1 content #74

Merged
merged 26 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
07f12c7
Clear vmthread from thread object at shutdown
tajila Oct 24, 2023
eb3c4ee
Merge pull request #56 from tajila/origin
JasonFengJ9 Oct 24, 2023
ced2599
Ensures time compensation is not less than checkpointRestoreTimeDelta
JasonFengJ9 Oct 24, 2023
07bee59
Merge pull request #57 from JasonFengJ9/timerexectime
tajila Oct 31, 2023
9663a4d
Backport "Classpath" exception for some riscv64 files from head stream
pshipton Nov 7, 2023
f8d2943
Merge pull request #58 from pshipton/cpe
keithc-ca Nov 7, 2023
dcfafee
8309545: Thread.interrupted from virtual thread needlessly resets int…
Jun 9, 2023
1edd940
8314759: VirtualThread.parkNanos timeout adjustment when pinned shoul…
Aug 24, 2023
4dbab3d
8315373: Change VirtualThread to unmount after freezing, re-mount bef…
Sep 10, 2023
0e5b7dd
8312174: missing JVMTI events from vthreads parked during JVMTI attach
Sep 12, 2023
8f677c4
8312498: Thread::getState and JVM TI GetThreadState should return TIM…
Sep 19, 2023
e5b3b58
8312777: notifyJvmtiMount before notifyJvmtiUnmount
Oct 20, 2023
c000538
Use GetExtensionEvents() to derive JVMTI extension event numbers
keithc-ca Sep 18, 2023
88ac736
Merge pull request #59 from babsingh/main1
hangshao0 Nov 10, 2023
193748c
Reduce the number of park and unpark iterations in ParkALot
babsingh Nov 13, 2023
61936f9
Merge pull request #60 from babsingh/main
pshipton Nov 13, 2023
141f67b
Append cp to annotation data to fix redefinition inconsistencies
theresa-m Nov 15, 2023
3659533
Remove definitions of unused make macros
keithc-ca Nov 15, 2023
4b666c7
Merge pull request #62 from keithc-ca/jncrypto
pshipton Nov 15, 2023
aa716a1
Adjust ThreadListStackTracesTest for checkReentrantLock
singh264 Nov 16, 2023
416fbd3
CRIU adds @NotCheckpointSafe for PrintStream.writeln(String)
JasonFengJ9 Nov 16, 2023
56e65df
Merge pull request #63 from singh264/openj9_issues_18089
babsingh Nov 17, 2023
02f3732
Merge pull request #64 from JasonFengJ9/pswriteln
tajila Nov 17, 2023
2278b32
Merge pull request #61 from theresa-m/parseannotation
tajila Nov 17, 2023
95aa083
Add PrintStream.java to $(SUPPORT_OUTPUTDIR)/overlay
JasonFengJ9 Nov 17, 2023
63cc16e
Merge pull request #65 from JasonFengJ9/overlay
keithc-ca Nov 17, 2023
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
1 change: 1 addition & 0 deletions closed/GensrcJ9JCL.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \
SRC := $(TOPDIR), \
DEST := $(SUPPORT_OUTPUTDIR)/overlay, \
FILES := \
src/java.base/share/classes/java/io/PrintStream.java \
src/java.base/share/classes/java/lang/ClassValue.java \
src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java \
src/java.base/share/classes/java/net/InetAddress.java \
Expand Down
13 changes: 3 additions & 10 deletions closed/custom/modules/java.base/Lib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# (c) Copyright IBM Corp. 2018, 2020 All Rights Reserved
# (c) Copyright IBM Corp. 2018, 2023 All Rights Reserved
# ===========================================================================
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
Expand All @@ -18,24 +18,17 @@
# 2 along with this work; if not, see <http://www.gnu.org/licenses/>.
# ===========================================================================

################################################################################
# Create the Java Native crypto library
ifeq ($(WITH_OPENSSL), yes)
$(eval $(call SetupJdkLibrary, BUILD_JNCRYPTO, \
NAME := jncrypto, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-c $(OPENSSL_CFLAGS), \
CFLAGS := $(CFLAGS_JDKLIB) $(OPENSSL_CFLAGS), \
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough unused-value, \
DISABLED_WARNINGS_clang := sign-compare, \
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBDL), \
))
TARGETS += $(BUILD_JNCRYPTO)
endif

INCLUDE_CUSTOM_EXTENSION_SYMBOLS := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$(LIBRARY_PREFIX)jncrypto.symbols
INCLUDE_CUSTOM_EXTENSION_LIB := BUILD_JNCRYPTO
################################################################################
13 changes: 13 additions & 0 deletions src/java.base/share/classes/java/io/PrintStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2023, 2023 All Rights Reserved
* ===========================================================================
*/

package java.io;

import java.util.Formatter;
Expand All @@ -34,6 +40,10 @@
import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.InternalLock;

/*[IF CRIU_SUPPORT]*/
import openj9.internal.criu.NotCheckpointSafe;
/*[ENDIF] CRIU_SUPPORT */

/**
* A {@code PrintStream} adds functionality to another output stream,
* namely the ability to print representations of various data values
Expand Down Expand Up @@ -818,6 +828,9 @@ private void implWrite(String s) throws IOException {
// using println, but since subclasses could exist which depend on
// observing a call to print followed by newLine we only use this if
// getClass() == PrintStream.class to avoid compatibility issues.
/*[IF CRIU_SUPPORT]*/
@NotCheckpointSafe
/*[ENDIF] CRIU_SUPPORT */
private void writeln(String s) {
try {
if (lock != null) {
Expand Down
45 changes: 24 additions & 21 deletions src/java.base/share/classes/java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -1627,32 +1627,35 @@ void clearReferences() {
* a chance to clean up before it actually exits.
*/
void exit() {
/* Refresh interrupted value so it is accurate when thread reference is removed. */
interrupted = interrupted();

try {
// pop any remaining scopes from the stack, this may block
if (headStackableScopes != null) {
StackableScope.popAll();
}
} finally {
// notify container that thread is exiting
ThreadContainer container = threadContainer();
if (container != null) {
container.onExit(this);
/* Refresh interrupted value so it is accurate when thread reference is removed. */
interrupted = interrupted();

try {
// pop any remaining scopes from the stack, this may block
if (headStackableScopes != null) {
StackableScope.popAll();
}
} finally {
// notify container that thread is exiting
ThreadContainer container = threadContainer();
if (container != null) {
container.onExit(this);
}
}
}

try {
if (threadLocals != null && TerminatingThreadLocal.REGISTRY.isPresent()) {
TerminatingThreadLocal.threadTerminated();
try {
if (threadLocals != null && TerminatingThreadLocal.REGISTRY.isPresent()) {
TerminatingThreadLocal.threadTerminated();
}
} finally {
clearReferences();
}
} finally {
clearReferences();
}
synchronized (interruptLock) {
// so that isAlive() can work
eetop = Thread.NO_REF;
synchronized (interruptLock) {
// so that isAlive() can work
eetop = Thread.NO_REF;
}
}
}

Expand Down
Loading