< prev index next >
src/hotspot/share/gc/z/zNMethod.cpp
}
// Attach GC data to nmethod
ZNMethodData* data = gc_data(nm);
if (data == NULL) {
! data = ZNMethodData::create(nm);
set_gc_data(nm, data);
}
// Attach oops in GC data
ZNMethodDataOops* const new_oops = ZNMethodDataOops::create(immediate_oops, non_immediate_oops);
ZNMethodDataOops* const old_oops = data->swap_oops(new_oops);
ZNMethodDataOops::destroy(old_oops);
}
- void ZNMethod::detach_gc_data(nmethod* nm) {
- // Destroy GC data
- ZNMethodData::destroy(gc_data(nm));
- set_gc_data(nm, NULL);
- }
-
ZReentrantLock* ZNMethod::lock_for_nmethod(nmethod* nm) {
! ZNMethodData* const data = gc_data(nm);
! if (data == NULL) {
! return NULL;
! }
! return data->lock();
}
void ZNMethod::log_register(const nmethod* nm) {
LogTarget(Trace, gc, nmethod) log;
if (!log.is_enabled()) {
}
// Attach GC data to nmethod
ZNMethodData* data = gc_data(nm);
if (data == NULL) {
! data = new ZNMethodData();
set_gc_data(nm, data);
}
// Attach oops in GC data
ZNMethodDataOops* const new_oops = ZNMethodDataOops::create(immediate_oops, non_immediate_oops);
ZNMethodDataOops* const old_oops = data->swap_oops(new_oops);
ZNMethodDataOops::destroy(old_oops);
}
ZReentrantLock* ZNMethod::lock_for_nmethod(nmethod* nm) {
! return gc_data(nm)->lock();
}
void ZNMethod::log_register(const nmethod* nm) {
LogTarget(Trace, gc, nmethod) log;
if (!log.is_enabled()) {
***************
ResourceMark rm;
log_unregister(nm);
ZNMethodTable::unregister_nmethod(nm);
! // Destroy and detach gc data
! detach_gc_data(nm);
}
void ZNMethod::disarm_nmethod(nmethod* nm) {
BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs != NULL) {
ResourceMark rm;
log_unregister(nm);
ZNMethodTable::unregister_nmethod(nm);
+ }
! void ZNMethod::flush_nmethod(nmethod* nm) {
! // Destroy GC data
! delete gc_data(nm);
}
void ZNMethod::disarm_nmethod(nmethod* nm) {
BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
if (bs != NULL) {
< prev index next >