mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-17 17:07:53 +00:00
8129440: G1 crash during concurrent root region scan
Make concurrent memory accesses to oops on the heap volatile to avoid reloading by the compiler duplicating oop loading code. Reviewed-by: ehelin, eosterlund
This commit is contained in:
parent
3be36b20e4
commit
b0e4bce398
@ -33,6 +33,7 @@
|
||||
#include "gc/g1/heapRegion.inline.hpp"
|
||||
#include "gc/g1/heapRegionRemSet.hpp"
|
||||
#include "memory/iterator.inline.hpp"
|
||||
#include "oops/access.inline.hpp"
|
||||
#include "runtime/prefetch.inline.hpp"
|
||||
|
||||
template <class T>
|
||||
@ -87,13 +88,13 @@ inline void G1ScanEvacuatedObjClosure::do_oop_nv(T* p) {
|
||||
|
||||
template <class T>
|
||||
inline void G1CMOopClosure::do_oop_nv(T* p) {
|
||||
oop obj = oopDesc::load_decode_heap_oop(p);
|
||||
oop obj = RawAccess<MO_VOLATILE>::oop_load(p);
|
||||
_task->deal_with_reference(obj);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
T heap_oop = RawAccess<MO_VOLATILE>::oop_load(p);
|
||||
if (oopDesc::is_null(heap_oop)) {
|
||||
return;
|
||||
}
|
||||
@ -124,7 +125,7 @@ inline static void check_obj_during_refinement(T* p, oop const obj) {
|
||||
|
||||
template <class T>
|
||||
inline void G1ConcurrentRefineOopClosure::do_oop_nv(T* p) {
|
||||
T o = oopDesc::load_heap_oop(p);
|
||||
T o = RawAccess<MO_VOLATILE>::oop_load(p);
|
||||
if (oopDesc::is_null(o)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user