changeset 10904:827e57cd9f8a

8216987: ciMethodData::load_data() unpacks MDOs with non-atomic copy Reviewed-by: kvn, mdoerr, thartmann
author eosterlund
date Tue, 29 Jan 2019 10:13:23 +0100
parents 03570d8cebe0
children f57189b7648d
files src/share/vm/ci/ciMethodData.cpp
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/ci/ciMethodData.cpp	Sat May 11 01:17:18 2019 +0900
+++ b/src/share/vm/ci/ciMethodData.cpp	Tue Jan 29 10:13:23 2019 +0100
@@ -120,15 +120,17 @@
   // Snapshot the data -- actually, take an approximate snapshot of
   // the data.  Any concurrently executing threads may be changing the
   // data as we copy it.
-  Copy::disjoint_words((HeapWord*) mdo,
-                       (HeapWord*) &_orig,
-                       sizeof(_orig) / HeapWordSize);
+  Copy::disjoint_words_atomic((HeapWord*) mdo,
+                              (HeapWord*) &_orig,
+                              sizeof(_orig) / HeapWordSize);
   Arena* arena = CURRENT_ENV->arena();
   _data_size = mdo->data_size();
   _extra_data_size = mdo->extra_data_size();
   int total_size = _data_size + _extra_data_size;
   _data = (intptr_t *) arena->Amalloc(total_size);
-  Copy::disjoint_words((HeapWord*) mdo->data_base(), (HeapWord*) _data, total_size / HeapWordSize);
+  Copy::disjoint_words_atomic((HeapWord*) mdo->data_base(),
+                              (HeapWord*) _data,
+                              total_size / HeapWordSize);
 
   // Traverse the profile data, translating any oops into their
   // ci equivalents.