--- old/src/hotspot/share/services/mallocSiteTable.cpp 2017-10-13 18:29:35.062353611 -0400 +++ new/src/hotspot/share/services/mallocSiteTable.cpp 2017-10-13 18:29:34.597169837 -0400 @@ -147,7 +147,7 @@ if (entry == NULL) return NULL; // swap in the head - if (Atomic::cmpxchg_ptr((void*)entry, (volatile void *)&_table[index], NULL) == NULL) { + if (Atomic::cmpxchg(entry, &_table[index], (MallocSiteHashtableEntry*)NULL) == NULL) { return entry->data(); } @@ -257,3 +257,7 @@ } _lock_state = ExclusiveLock; } + +bool MallocSiteHashtableEntry::atomic_insert(MallocSiteHashtableEntry* entry) { + return Atomic::cmpxchg(entry, &_next, (MallocSiteHashtableEntry*)NULL) == NULL; +}