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

CRIU removes libj9criu29 #18745

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static boolean enableCRIUSecProvider() {
/**
* Queries if CRIU Checkpoint is allowed.
* isCRIUSupportEnabled() is invoked first to check if CRIU support is enabled,
* and j9criu29 is to be lazily loaded at checkpointJVM().
* and criu library has been loaded.
*
* @return true if Checkpoint is allowed, otherwise false
*/
Expand Down Expand Up @@ -204,20 +204,8 @@ public static enum HookMode {

private static boolean loadNativeLibrary() {
if (!nativeLoaded) {
try {
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
System.loadLibrary("j9criu29"); //$NON-NLS-1$
JasonFengJ9 marked this conversation as resolved.
Show resolved Hide resolved
return null;
});
if (setupJNIFieldIDsAndCRIUAPI()) {
nativeLoaded = true;
}
} catch (UnsatisfiedLinkError e) {
errorMsg = e.getMessage();
Properties internalProperties = com.ibm.oti.vm.VM.getVMLangAccess().internalGetProperties();
if (internalProperties.getProperty("enable.j9internal.checkpoint.hook.api.debug") != null) { //$NON-NLS-1$
e.printStackTrace();
}
if (setupJNIFieldIDsAndCRIUAPI()) {
nativeLoaded = true;
}
}

Expand Down Expand Up @@ -270,7 +258,7 @@ public InternalCRIUSupport(Path imageDir) {
}

/**
* Queries if CRIU support is enabled and j9criu29 library has been loaded.
* Queries if CRIU support is enabled and criu library has been loaded.
*
* @return TRUE if support is enabled and the library is loaded, FALSE otherwise
*/
Expand Down Expand Up @@ -868,7 +856,7 @@ private static void clearInetAddressCache() {
* restore
*/
public synchronized void checkpointJVM() {
if (isCRIUSupportEnabled()) {
if (isCRIUSupportEnabledAndNativeLoaded()) {
if (isCheckpointAllowed()) {
/* Add env variables restore hook. */
String envFilePath = null;
Expand All @@ -886,13 +874,8 @@ public synchronized void checkpointJVM() {

J9InternalCheckpointHookAPI.runPreCheckpointHooksConcurrentThread();
System.gc();
try {
checkpointJVMImpl(imageDir, leaveRunning, shellJob, extUnixSupport, logLevel, logFile, fileLocks,
workDir, tcpEstablished, autoDedup, trackMemory, unprivileged, optionsFile, envFilePath);
} catch (UnsatisfiedLinkError ule) {
errorMsg = ule.getMessage();
throw new InternalError("There is a problem with libj9criu in the JDK"); //$NON-NLS-1$
}
checkpointJVMImpl(imageDir, leaveRunning, shellJob, extUnixSupport, logLevel, logFile, fileLocks,
workDir, tcpEstablished, autoDedup, trackMemory, unprivileged, optionsFile, envFilePath);
J9InternalCheckpointHookAPI.runPostRestoreHooksConcurrentThread();
} else {
throw new UnsupportedOperationException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ public CRIUSupport(Path imageDir) {
}

/**
* Queries if CRIU support is enabled and j9criu29 library has been loaded.
* Queries if CRIU support is enabled and criu library has been loaded.
*
* @return TRUE if support is enabled and the library is loaded, FALSE otherwise
*/
public static boolean isCRIUSupportEnabled() {
return InternalCRIUSupport.isCRIUSupportEnabled();
return InternalCRIUSupport.isCRIUSupportEnabledAndNativeLoaded();
}

/**
Expand Down
3 changes: 0 additions & 3 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,6 @@ endif()
if(J9VM_MODULE_CODERT_VM)
add_subdirectory(codert_vm)
endif()
if(J9VM_OPT_CRIU_SUPPORT)
add_subdirectory(criusupport)
endif()
add_subdirectory(cuda)
if(J9VM_MODULE_DBGEXT)
add_subdirectory(dbgext)
Expand Down
53 changes: 0 additions & 53 deletions runtime/criusupport/CMakeLists.txt

This file was deleted.

24 changes: 0 additions & 24 deletions runtime/criusupport/exports.cmake

This file was deleted.

55 changes: 0 additions & 55 deletions runtime/criusupport/j9criu.tdf

This file was deleted.

45 changes: 0 additions & 45 deletions runtime/criusupport/module.xml

This file was deleted.

23 changes: 0 additions & 23 deletions runtime/criusupport/uma/criusupport_exports.xml

This file was deleted.