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

Reset JNI Addresses if FSD on restore (0.48) #20122

Merged
merged 1 commit into from
Sep 7, 2024

Commits on Sep 5, 2024

  1. Reset JNI Addresses if FSD on restore

    If debug is specified on restore, ensure that any proactively compiled
    JNI Methods are reset to their original address.
    
    JNI methods are not compiled under FSD, but they are compiled
    proactively in the checkpoint hook. However, if debug is specified on
    restore, all proactively compiled methods, except for JNI thunks, get
    invalidated. Thus, the extra field of the J9Method of a JNI method
    needs to get reset to whatever the VM initialized them to originally.
    
    This is necessary to ensure an environment that is consistent with FSD
    mode. The invalidation of proactively compiled non-JNI methods (which
    are non-FSD bodies) ensure that non-FSD code does not execute
    post-restore. At the checkpoint hook, only FSD bodies are on the stacks
    of the threads; although the compiler currently does not reuse these
    FSD bodies, they will continue to execute on restore until an OSR
    transition, but this is OK because they are already set up for
    involuntary OSR. The missing piece was the JNI methods, which this
    commit addresses.
    
    Signed-off-by: Irwin D'Souza <[email protected]>
    dsouzai committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    511d694 View commit details
    Browse the repository at this point in the history