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

[lworld] Fix post-parse call devirtualization with inline type receiver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      Post-parse call devirtualization (JDK-8257211) converts virtual calls to static calls which allows an inline type receiver to be passed as fields and the corresponding buffer allocation to become useless.

      Currently, the inline type nodes created during that optimization and also such useless buffer allocations are not removed, leading to missed optimization opportunities and asserts like below.

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/oracle/valhalla2/open/src/hotspot/share/opto/compile.cpp:4104), pid=2752650, tid=2752665
      # assert(false) failed: inline type node was not removed

      Current CompileTask:
      C2: 3704 1217 b 4 compiler.valhalla.inlinetypes.TestLWorld::test150 (54 bytes)

      Stack: [0x00007fab1783a000,0x00007fab1793b000], sp=0x00007fab17935fa0, free space=1007k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xa3db26] Compile::final_graph_reshaping_main_switch(Node*, Final_Reshape_Counts&, unsigned int)+0x496
      V [libjvm.so+0xa3f3c5] Compile::final_graph_reshaping_impl(Node*, Final_Reshape_Counts&) [clone .part.0]+0x85
      V [libjvm.so+0xa3fac8] Compile::final_graph_reshaping_walk(Node_Stack&, Node*, Final_Reshape_Counts&)+0x138
      V [libjvm.so+0xa4c011] Compile::final_graph_reshaping()+0x331
      V [libjvm.so+0xa5214a] Compile::Optimize()+0x193a
      V [libjvm.so+0xa53890] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x1630
      V [libjvm.so+0x844640] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x6a0
      V [libjvm.so+0xa639f1] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xd31
      V [libjvm.so+0xa64728] CompileBroker::compiler_thread_loop()+0x598
      V [libjvm.so+0x1966a1c] JavaThread::thread_main_inner()+0x27c
      V [libjvm.so+0x196d040] Thread::call_run()+0x100
      V [libjvm.so+0x161dfa4] thread_native_entry(Thread*)+0x104

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              thartmann Tobias Hartmann
              Reporter:
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: