equal
deleted
inserted
replaced
49 // either the CompiledIC_lock must be set or we must be at a safe point. |
49 // either the CompiledIC_lock must be set or we must be at a safe point. |
50 |
50 |
51 CompiledICLocker::CompiledICLocker(CompiledMethod* method) |
51 CompiledICLocker::CompiledICLocker(CompiledMethod* method) |
52 : _method(method), |
52 : _method(method), |
53 _behaviour(CompiledICProtectionBehaviour::current()), |
53 _behaviour(CompiledICProtectionBehaviour::current()), |
54 _locked(_behaviour->lock(_method)){ |
54 _locked(_behaviour->lock(_method)), |
|
55 _nsv(true, !SafepointSynchronize::is_at_safepoint()) { |
55 } |
56 } |
56 |
57 |
57 CompiledICLocker::~CompiledICLocker() { |
58 CompiledICLocker::~CompiledICLocker() { |
58 if (_locked) { |
59 if (_locked) { |
59 _behaviour->unlock(_method); |
60 _behaviour->unlock(_method); |
581 // This call site might have become stale so inspect it carefully. |
582 // This call site might have become stale so inspect it carefully. |
582 address dest = cm->call_wrapper_at(call_site->addr())->destination(); |
583 address dest = cm->call_wrapper_at(call_site->addr())->destination(); |
583 return is_icholder_entry(dest); |
584 return is_icholder_entry(dest); |
584 } |
585 } |
585 |
586 |
586 // Release the CompiledICHolder* associated with this call site is there is one. |
|
587 void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) { |
|
588 assert(cm->is_nmethod(), "must be nmethod"); |
|
589 // This call site might have become stale so inspect it carefully. |
|
590 NativeCall* call = nativeCall_at(call_site->addr()); |
|
591 if (is_icholder_entry(call->destination())) { |
|
592 NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value()); |
|
593 InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data()); |
|
594 } |
|
595 } |
|
596 |
|
597 // ---------------------------------------------------------------------------- |
587 // ---------------------------------------------------------------------------- |
598 |
588 |
599 bool CompiledStaticCall::set_to_clean(bool in_use) { |
589 bool CompiledStaticCall::set_to_clean(bool in_use) { |
600 // in_use is unused but needed to match template function in CompiledMethod |
590 // in_use is unused but needed to match template function in CompiledMethod |
601 assert(CompiledICLocker::is_safe(instruction_address()), "mt unsafe call"); |
591 assert(CompiledICLocker::is_safe(instruction_address()), "mt unsafe call"); |