RFR: 8305523: Some StoreStore barriers in the interpreter are unnecessary after JDK-8205683
SUN Guoyun
duke at openjdk.org
Tue Apr 4 07:30:15 UTC 2023
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.
-------------
Commit messages:
- 8305523: Some StoreStore barriers in the interpreter are unnecessary after JDK-8205683
Changes: https://git.openjdk.org/jdk/pull/13320/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13320&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8305523
Stats: 24 lines in 3 files changed: 0 ins; 24 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/13320.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13320/head:pull/13320
PR: https://git.openjdk.org/jdk/pull/13320
More information about the hotspot-compiler-dev
mailing list