From f79d19e408291ee5524c40c4ab93281a462953a3 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 20 Dec 2011 16:56:50 +0100 Subject: 7121140: Allocation paths require explicit memory synchronization operations for RMO systems Summary: adds store store barrier after initialization of header and body of objects. Reviewed-by: never, kvn --- src/share/vm/opto/graphKit.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/share/vm/opto/graphKit.cpp') diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp index 0fc0a7c4f..565896079 100644 --- a/src/share/vm/opto/graphKit.cpp +++ b/src/share/vm/opto/graphKit.cpp @@ -3337,6 +3337,19 @@ InitializeNode* AllocateNode::initialization() { return NULL; } +// Trace Allocate -> Proj[Parm] -> MemBarStoreStore +MemBarStoreStoreNode* AllocateNode::storestore() { + ProjNode* rawoop = proj_out(AllocateNode::RawAddress); + if (rawoop == NULL) return NULL; + for (DUIterator_Fast imax, i = rawoop->fast_outs(imax); i < imax; i++) { + Node* storestore = rawoop->fast_out(i); + if (storestore->is_MemBarStoreStore()) { + return storestore->as_MemBarStoreStore(); + } + } + return NULL; +} + //----------------------------- loop predicates --------------------------- //------------------------------add_predicate_impl---------------------------- -- cgit v1.2.3