-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b32
-
x86
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083388 | emb-9 | Aleksey Shipilev | P4 | Resolved | Fixed | b32 |
The issue was originally found in a larger benchmark, but can be also shown with targeted tests.
In short, on x86, we emit "lock addl %(esp+0), 0" as the substitute for StoreLoad barrier, and while this thing seems faster than "mfence", we interfere with things residing on the top of the stack: call arguments, for one example. The interaction appears to be either the true data dependency via %(esp+0), or the implicit dependency via the cache line containing %(esp+0) locked with lock-prefixed instruction.
This bug suggests to reconsider the instruction sequence emitted for the StoreLoad barrier, see comments.
In short, on x86, we emit "lock addl %(esp+0), 0" as the substitute for StoreLoad barrier, and while this thing seems faster than "mfence", we interfere with things residing on the top of the stack: call arguments, for one example. The interaction appears to be either the true data dependency via %(esp+0), or the implicit dependency via the cache line containing %(esp+0) locked with lock-prefixed instruction.
This bug suggests to reconsider the instruction sequence emitted for the StoreLoad barrier, see comments.
- backported by
-
JDK-8083388 StoreLoad barrier interferes with stack usages
-
- Resolved
-
- relates to
-
JDK-8057780 Fix ppc build after "8050147: StoreLoad barrier interferes with stack usages"
-
- Resolved
-
-
JDK-8050149 Experimental option to select the instruction sequence for x86 StoreLoad barrier
-
- Closed
-