< prev index next >

src/hotspot/share/gc/z/zBarrierSetNMethod.cpp

Print this page

40     // and disarmed the nmethod.
41     return true;
42   }
43 
44   MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, Thread::current()));
45 
46   if (nm->is_unloading()) {
47     // We don't need to take the lock when unlinking nmethods from
48     // the Method, because it is only concurrently unlinked by
49     // the entry barrier, which acquires the per nmethod lock.
50     nm->unlink_from_method();
51 
52     // We can end up calling nmethods that are unloading
53     // since we clear compiled ICs lazily. Returning false
54     // will re-resovle the call and update the compiled IC.
55     return false;
56   }
57 
58   // Heal oops
59   ZNMethod::nmethod_oops_barrier(nm);

60 
61   // Disarm
62   disarm(nm);
63 
64   return true;
65 }
66 
67 int* ZBarrierSetNMethod::disarmed_value_address() const {
68   return (int*)ZAddressBadMaskHighOrderBitsAddr;
69 }
70 
71 ByteSize ZBarrierSetNMethod::thread_disarmed_offset() const {
72   return ZThreadLocalData::nmethod_disarmed_offset();
73 }

40     // and disarmed the nmethod.
41     return true;
42   }
43 
44   MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, Thread::current()));
45 
46   if (nm->is_unloading()) {
47     // We don't need to take the lock when unlinking nmethods from
48     // the Method, because it is only concurrently unlinked by
49     // the entry barrier, which acquires the per nmethod lock.
50     nm->unlink_from_method();
51 
52     // We can end up calling nmethods that are unloading
53     // since we clear compiled ICs lazily. Returning false
54     // will re-resovle the call and update the compiled IC.
55     return false;
56   }
57 
58   // Heal oops
59   ZNMethod::nmethod_oops_barrier(nm);
60   nm->mark_as_maybe_on_continuation();
61 
62   // Disarm
63   disarm(nm);
64 
65   return true;
66 }
67 
68 int* ZBarrierSetNMethod::disarmed_value_address() const {
69   return (int*)ZAddressBadMaskHighOrderBitsAddr;
70 }
71 
72 ByteSize ZBarrierSetNMethod::thread_disarmed_offset() const {
73   return ZThreadLocalData::nmethod_disarmed_offset();
74 }
< prev index next >