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

Delay AOT validation until restore under -XX:+DebugOnRestore #19316

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

dsouzai
Copy link
Contributor

@dsouzai dsouzai commented Apr 12, 2024

Under -XX:+DebugOnRestore, the JIT generates FSD code. This is problematic for AOT as either:

  1. An existing SCC will fail validation, since the AOT code therein will not have been generated with FSD, or
  2. An unpopulated SCC will contain FSD code, which will be useless for any JVM that does not have FSD enabled

This commit delays AOT validation until after restore; this ensures that AOT code from the SCC can be loaded post-restore, and that any code added to the SCC is maximally sharable.

Parent issue: #18866

@dsouzai dsouzai added comp:jit comp:jit:aot criu Used to track CRIU snapshot related work labels Apr 12, 2024
@dsouzai
Copy link
Contributor Author

dsouzai commented Apr 12, 2024

@mpirvu could you please review?

@dsouzai
Copy link
Contributor Author

dsouzai commented Apr 17, 2024

@mpirvu review reminder.

Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpirvu mpirvu self-assigned this Apr 17, 2024
@mpirvu
Copy link
Contributor

mpirvu commented Apr 17, 2024

jenkins test sanity all jdk17

@mpirvu
Copy link
Contributor

mpirvu commented Apr 17, 2024

Build failure:

11:23:11  /Users/jenkins/workspace/Build_JDK17_aarch64_mac_Personal/openj9/runtime/compiler/env/J9SharedCache.cpp:68:24: error: no member named '_aotHeaderValidationDelayed' in 'TR_J9SharedCache'
11:23:11  bool TR_J9SharedCache::_aotHeaderValidationDelayed = false;

@dsouzai
Copy link
Contributor Author

dsouzai commented Apr 17, 2024

Ah, I didn't guard the static field initialization with #if defined(J9VM_OPT_CRIU_SUPPORT)

Under -XX:+DebugOnRestore, the JIT generates FSD code. This is
problematic for AOT as either:

1. An existing SCC will fail validation, since the AOT code therein will
   not have been generated with FSD, or
2. An unpopulated SCC will contain FSD code, which will be useless for
   any JVM that does not have FSD enabled

This commit delays AOT validation until after restore; this ensures that
AOT code from the SCC can be loaded post-restore, and that any code
added to the SCC is maximally sharable.

Signed-off-by: Irwin D'Souza <[email protected]>
@dsouzai
Copy link
Contributor Author

dsouzai commented Apr 17, 2024

jenkins test sanity all jdk17

@dsouzai
Copy link
Contributor Author

dsouzai commented Apr 18, 2024

win64 failure because all nodes were offline

@mpirvu
Copy link
Contributor

mpirvu commented Apr 18, 2024

Merging since tests have passed (windows failures are due to infra)

@mpirvu mpirvu merged commit fad776c into eclipse-openj9:master Apr 18, 2024
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit:aot comp:jit criu Used to track CRIU snapshot related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants