8216987: ciMethodData::load_data() unpacks MDOs with non-atomic copy
Reviewed-by: kvn, mdoerr, thartmann
This commit is contained in:
parent
76946b97e4
commit
51e2252a73
@ -208,15 +208,17 @@ void ciMethodData::load_data() {
|
|||||||
// Snapshot the data -- actually, take an approximate snapshot of
|
// Snapshot the data -- actually, take an approximate snapshot of
|
||||||
// the data. Any concurrently executing threads may be changing the
|
// the data. Any concurrently executing threads may be changing the
|
||||||
// data as we copy it.
|
// data as we copy it.
|
||||||
Copy::disjoint_words((HeapWord*) mdo,
|
Copy::disjoint_words_atomic((HeapWord*) mdo,
|
||||||
(HeapWord*) &_orig,
|
(HeapWord*) &_orig,
|
||||||
sizeof(_orig) / HeapWordSize);
|
sizeof(_orig) / HeapWordSize);
|
||||||
Arena* arena = CURRENT_ENV->arena();
|
Arena* arena = CURRENT_ENV->arena();
|
||||||
_data_size = mdo->data_size();
|
_data_size = mdo->data_size();
|
||||||
_extra_data_size = mdo->extra_data_size();
|
_extra_data_size = mdo->extra_data_size();
|
||||||
int total_size = _data_size + _extra_data_size;
|
int total_size = _data_size + _extra_data_size;
|
||||||
_data = (intptr_t *) arena->Amalloc(total_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
|
// Traverse the profile data, translating any oops into their
|
||||||
// ci equivalents.
|
// ci equivalents.
|
||||||
|
Loading…
Reference in New Issue
Block a user