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

(v0.38.0-release) Support for restore args env var & CRIU getRestoreSystemProperites() skips non system property entries #16880

Merged
merged 2 commits into from Mar 14, 2023

Conversation

JasonFengJ9
Copy link
Member

tajila and others added 2 commits March 10, 2023 14:44
This PR builds on the existing support for EnvVars
(see eclipse-openj9#13545) by
recognizing a special env var OPENJ9_RESTORE_JAVA_OPTIONS which can be
used to specify JVM options at upon JVM restore. This env var is ignored
when -XX:+EnableCRIUSupport is not specified and it is also ignored at
startup.

Documentation will be added later to describe what kind of options can
be specified upon restore. Initially all options will be parsed, but this PR
only supports the addition of Java properties, all other options will
be ignored.

All options are placed in the vm->checkpointState.restoreArgsList, this
is what the JVM components (VM, JIT, GC) will look at to extract restore
options.

This PR parses the JVM options before any Java code is run upon restore
so that the JVM can act on the changes immediately. A tracepoint is added
to display all the restore options (-Xtrace:print=j9criu.16), further
support will be added to javadump.

A restore option "-XX:+IgnoreUnrecognizedRestoreOptions" is added, this
option notifies the JVM to ignore any options that are not supported on
restore. Without this option the JVM will throw a restore exception if
an unsupported option is specified.

Related: eclipse-openj9#15844
Closes: eclipse-openj9#15839

Signed-off-by: Tobi Ajila <atobia@ca.ibm.com>
The index is only for the system property entries;
Mark -Xoptionsfile= as consumed;
Added explicit failure exception and error messages.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@JasonFengJ9 JasonFengJ9 added comp:vm criu Used to track CRIU snapshot related work labels Mar 10, 2023
@JasonFengJ9 JasonFengJ9 requested a review from tajila March 10, 2023 19:49
@tajila tajila merged commit 36d8070 into eclipse-openj9:v0.38.0-release Mar 14, 2023
@JasonFengJ9 JasonFengJ9 deleted the criuenv-0.38 branch March 16, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm criu Used to track CRIU snapshot related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants