# HG changeset patch # User eosterlund # Date 1548753203 -3600 # Node ID ce77e4d928f3bcfd1793018b8282706d108b62d5 # Parent 4cfa5f51eafa7a0038f8e73b41ef3c2c585706db 8216987: ciMethodData::load_data() unpacks MDOs with non-atomic copy Reviewed-by: kvn, mdoerr, thartmann diff -r 4cfa5f51eafa -r ce77e4d928f3 src/hotspot/share/ci/ciMethodData.cpp --- a/src/hotspot/share/ci/ciMethodData.cpp Tue Jan 29 09:10:08 2019 +0000 +++ b/src/hotspot/share/ci/ciMethodData.cpp Tue Jan 29 10:13:23 2019 +0100 @@ -208,15 +208,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.