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

Recompile FSD Bodies generated under -XX:+DebugOnRestore #18982

Merged
merged 3 commits into from
Apr 12, 2024

Commits on Apr 11, 2024

  1. Don't try compiling again during Shutdown

    On shutdown, a compilation is aborted via the
    TR::CompilationInterrupted exception. However, the error code associated
    with this exception (compilationInterrupted) will result in the
    compilation being retried.
    
    In a synchronous compilation, it is possible for a thread to remaining
    waiting on the queue slot monitor; it would only be notified if the
    compilation was not retried. Essentially the following is possible in a
    synchronous compilation:
    
    * Requesting Thread adds method to be compiled
    * Requesting thread waits on the queue slot monitor
    * Compilation Thread picks up the entry, and starts compiling
    * Shutdown Thread starts shutdown process which:
      * Interrupts compilations in progress
      * Sets the _compilationThreadState to COMPTHREAD_SIGNAL_TERMINATE
    * Compilation Thread aborts compilation via TR::CompilationInterrupted
    * Compilation Thread calls shouldRetryCompilation which:
      * Returns true for compilationInterrupted
    * Compilation Thread requeues entry, does not notify waiting Requesting
      Thread
    * Compilation Thread exits loop in
      TR::CompilationInfoPerThread::processEntries
    * Requesting Thread remains waiting on the queue slot monitor
    
    This commit updates shouldRetryCompilation to return false if the JVM is
    shutting down.
    
    Signed-off-by: Irwin D'Souza <[email protected]>
    dsouzai committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    1e9f472 View commit details
    Browse the repository at this point in the history
  2. Recompile FSD Bodies generated pre-checkpoint under -XX:+DebugOnRestore

    Post-restore, recompile all methods that were compiled using FSD to
    ensure steady state throughput is not impacted by the code quality of FSD
    code. Additionally, attempt compilation of all methods that failed first
    time compilation, as the failure is more than likely due to the
    constraints imposed by FSD compilation (e.g., JNI methods).
    
    Signed-off-by: Irwin D'Souza <[email protected]>
    dsouzai committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    69956f0 View commit details
    Browse the repository at this point in the history
  3. Disable sample based recompilation pre-checkpoint under -XX:+DebugOnR…

    …estore
    
    Disable sample based recompilation pre-checkpoint when
    -XX:+DebugOnRestore is specified as it does not provide any benefit and
    can complicate the infrastructure.
    
    Signed-off-by: Irwin D'Souza <[email protected]>
    dsouzai committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    f0d24de View commit details
    Browse the repository at this point in the history