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

Some StoreStore barriers in the interpreter are unnecessary after JDK-8205683

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 21
    • hotspot
    • aarch64
    • generic

      After JDK-8205683, InterpreterRuntime::_new() and InterpreterRuntime::newarray() eventually calls Atomic::release_store() to prevent reordering of stores for object initialization with stores that publish the new object. The stack call is as follows

      Atomic::release_store((Klass**)raw_mem, k)
      oopDesc::release_set_klass(HeapWord* mem, Klass* k)
      oop MemAllocator::finish(HeapWord* mem)
      ArrayKlass::cast(klass)->allocate_arrayArray(1, length, THREAD);
      oopFactory::new_objArray(klass, size, CHECK);
      InterpreterRuntime::anewarray(JavaThread* current, ConstantPool* pool, int index, jint size)

      So StoreStore barriers trailing behind bytecode _new, newarray, anewarray is unnecessary.

      aarch64, riscv and ppc have the same problem.

            sguoyun Sun Guoyun
            sguoyun Sun Guoyun
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: