Prepared by: | goetz on Wed Nov 27 23:37:27 CET 2013 |
---|---|
Workspace: | /net/usr.work/d045726/oJ/raw-stage-hotspot |
Compare against: | http://hg.openjdk.java.net/ppc-aix-port/stage/hotspot |
Compare against version: | 5727 |
Summary of changes: | 55 lines changed: 49 ins; 0 del; 6 mod; 14684 unchg |
Changeset: | raw-stage-hotspot.changeset |
Author comments: | Implementation of memory ordering for volatile/unsafe accesses. This supports ordering of "Independent Reads of Independent Writes" as tested by VolatileIRIWTest of the torture test suite:
Example: volatile x=0, y=0 __________ __________ __________ __________ | Thread 0 | | Thread 1 | | Thread 2 | | Thread 3 | write(x=1) read(x) write(y=1) read(y) read(y) read(x) Disallowed: x=1, y=0 y=1, x=0 Solution: This example requires multiple-copy-atomicity. This is only assured by the sync instruction and if it is executed in the thread doing the load. Thus we implement volatile read as sync-load-acquire and omit the sync/MemBarVolatile after the volatile store. MemBarVolatile is implemented by sync on PPC. This addresses a similar issue as fix "8012144: multiple SIGSEGVs fails on staxf" for taskqueue.hpp. Further this change contains a fix that assures that volatile fields written in constructors are visible before the reference gets published. Looking at the code, we found a MemBarRelease that to us, seems too strong. We think in parse1.cpp do_exits() a MemBarStoreStore should suffice. |
Legend: |
Modified file Deleted file New file |
Cdiffs
Udiffs
Wdiffs
Sdiffs
Frames
Old
New
-----
Raw
src/share/vm/interpreter/bytecodeInterpreter.cpp
rev 5728 : 8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Contributed-by: mdoerr3 lines changed: 3 ins; 0 del; 0 mod; 3468 unchg
Cdiffs
Udiffs
Wdiffs
Sdiffs
Frames
Old
New
-----
Raw
src/share/vm/opto/library_call.cpp
rev 5728 : 8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Contributed-by: mdoerr11 lines changed: 7 ins; 0 del; 4 mod; 6099 unchg
Cdiffs
Udiffs
Wdiffs
Sdiffs
Frames
Old
New
-----
Raw
src/share/vm/opto/parse.hpp
rev 5728 : 8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Contributed-by: mdoerr5 lines changed: 5 ins; 0 del; 0 mod; 624 unchg
Cdiffs
Udiffs
Wdiffs
Sdiffs
Frames
Old
New
-----
Raw
src/share/vm/opto/parse1.cpp
rev 5728 : 8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Contributed-by: mdoerr5 lines changed: 4 ins; 0 del; 1 mod; 2192 unchg
Cdiffs
Udiffs
Wdiffs
Sdiffs
Frames
Old
New
-----
Raw
src/share/vm/opto/parse3.cpp
rev 5728 : 8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Contributed-by: mdoerr28 lines changed: 27 ins; 0 del; 1 mod; 549 unchg
Cdiffs
Udiffs
Wdiffs
Sdiffs
Frames
Old
New
-----
Raw
src/share/vm/prims/unsafe.cpp
rev 5728 : 8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Contributed-by: mdoerr3 lines changed: 3 ins; 0 del; 0 mod; 1752 unchg
This code review page was prepared using /sapmnt/home1/d045726/bin/webrev.ksh (vers 24.0-hg+jbs).