Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214352

C1: Unnecessary "compilation bailout: block join failed" with JVMTI

    XMLWordPrintable

Details

    • b01

    Backports

      Description

        We have noticed some C1 compilation bailouts when using a JVMTI agent which enables the capability "can_access_local_variables".
        This can be observed when using the following VM options (in debug build):
        -XX:+PrintBailouts -agentlib:jdwp=transport=dt_socket,address=80,server=y,suspend=n

        For example SPEC JVM98 compress:
        2073 408 % 3 spec.benchmarks._201_compress.Compressor::compress @ 72 (328 bytes) COMPILE SKIPPED: block join failed (retry at different tier)

        We also see several "compilation bailout: block join failed" when running Octane benchmark.

        This happens when BlockBegin::try_merge finds out that a Phi function for a local value in a loop has inputs with different types. We are obviously beyond the life range (out of scope) and the local value is invalid at this point. The bailout can be avoided by invalidating corresponding Phi functions. We just need to skip them when processing exception entries later on.
        In very rare cases, we may still bail out from LIRGenerator::move_to_phi where we already check for such Phi functions (since JDK-8151818).

        Attachments

          Issue Links

            Activity

              People

                mdoerr Martin Doerr
                mdoerr Martin Doerr
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: