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

Obsolete -XX:+InsertMemBarAfterArraycopy

    Details

    • Subcomponent:
    • Resolved In Build:
      b16

      Description

      [~roland] noticed that the MemBarCPUOrder is not correctly inserted into the graph when InsertMemBarAfterArraycopy is disabled. Control is updated but never used:

          if (!InsertMemBarAfterArraycopy) {
            // (If InsertMemBarAfterArraycopy, there is already one in place.)
            insert_mem_bar(&ctrl, &mem, Op_MemBarCPUOrder);
          }

      Also, running with -XX:-InsertMemBarAfterArraycopy hits several asserts:

      # Internal Error (t:\workspace\open\src\hotspot\share\opto/node.hpp:864), pid=24008, tid=30468
      # assert(is_MemBar()) failed: invalid node class

      Current CompileTask:
      C2: 1434 556 4 sun.jvm.hotspot.utilities.CStringUtilities::getString (124 bytes)

      Stack: [0x000000f23ce00000,0x000000f23cf00000]
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0xa60c31] os::platform_print_native_stack+0xf1 (os_windows_x86.cpp:236)
      V [jvm.dll+0xc7f4e7] VMError::report+0xf97 (vmError.cpp:732)
      V [jvm.dll+0xc80d9e] VMError::report_and_die+0x7de (vmError.cpp:1548)
      V [jvm.dll+0xc81454] VMError::report_and_die+0x64 (vmError.cpp:1341)
      V [jvm.dll+0x441377] report_vm_error+0x117 (debug.cpp:264)
      V [jvm.dll+0x925933] PhaseMacroExpand::generate_arraycopy+0x2443 (macroArrayCopy.cpp:726)
      V [jvm.dll+0x92324a] PhaseMacroExpand::expand_arraycopy_node+0xbca (macroArrayCopy.cpp:1117)
      V [jvm.dll+0x918447] PhaseMacroExpand::expand_macro_nodes+0xa97 (macro.cpp:2765)
      V [jvm.dll+0x3fc7ef] Compile::Optimize+0x125f (compile.cpp:2216)
      V [jvm.dll+0x3f90f9] Compile::Compile+0x1129 (compile.cpp:732)
      V [jvm.dll+0x3335fc] C2Compiler::compile_method+0x12c (c2compiler.cpp:105)
      V [jvm.dll+0x41113e] CompileBroker::invoke_compiler_on_method+0x8be (compileBroker.cpp:2229)
      V [jvm.dll+0x40ef75] CompileBroker::compiler_thread_loop+0x315 (compileBroker.cpp:1903)
      V [jvm.dll+0xc1a579] JavaThread::run+0x2f9 (thread.cpp:1993)
      V [jvm.dll+0xc10894] Thread::call_run+0x1b4 (thread.cpp:400)
      V [jvm.dll+0xa5f62e] thread_native_entry+0x10e (os_windows.cpp:463)
      C [ucrtbase.dll+0x1fb80] _o__realloc_base+0x60
      C [KERNEL32.DLL+0x84d4] BaseThreadInitThunk+0x14
      C [ntdll.dll+0x6e871] RtlUserThreadStart+0x21


      # Internal Error (.../workspace/open/src/hotspot/share/opto/loopnode.cpp:1129), pid=19677, tid=19707
      # assert(outer->outcnt() >= phis + 2 && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis

      Current CompileTask:
      C2: 32871 3694 b javax.management.ObjectName::setCanonicalName (251 bytes)

      Stack: [0x00007f3210aed000,0x00007f3210bee000], sp=0x00007f3210be9120, free space=1008k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x12277de] LoopNode::verify_strip_mined(int) const+0xbde
      V [libjvm.so+0x919e79] Compile::final_graph_reshaping_main_switch(Node*, Final_Reshape_Counts&, unsigned int)+0x3c9
      V [libjvm.so+0x91bd05] Compile::final_graph_reshaping_impl(Node*, Final_Reshape_Counts&) [clone .part.0]+0x85
      V [libjvm.so+0x91c528] Compile::final_graph_reshaping_walk(Node_Stack&, Node*, Final_Reshape_Counts&)+0x1c8
      V [libjvm.so+0x922d8c] Compile::final_graph_reshaping()+0x41c
      V [libjvm.so+0x927d2b] Compile::Optimize()+0x10db
      V [libjvm.so+0x9292f9] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1529
      V [libjvm.so+0x76dc34] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x184
      V [libjvm.so+0x938a48] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe98
      V [libjvm.so+0x939608] CompileBroker::compiler_thread_loop()+0x5a8
      V [libjvm.so+0x17901f6] JavaThread::thread_main_inner()+0x256
      V [libjvm.so+0x17965d0] Thread::call_run()+0x100
      V [libjvm.so+0x148e9a6] thread_native_entry(Thread*)+0x116

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: