732 CompiledMethod *nm = cb->as_compiled_method_or_null();
733 if (nm != NULL) {
734 count += nm->verify_icholder_relocations();
735 }
736 }
737 }
738 assert(count + InlineCacheBuffer::pending_icholder_count() + CompiledICHolder::live_not_claimed_count() ==
739 CompiledICHolder::live_count(), "must agree");
740 #endif
741 }
742
743 // Defer freeing of concurrently cleaned ExceptionCache entries until
744 // after a global handshake operation.
745 void CodeCache::release_exception_cache(ExceptionCache* entry) {
746 if (SafepointSynchronize::is_at_safepoint()) {
747 delete entry;
748 } else {
749 for (;;) {
750 ExceptionCache* purge_list_head = Atomic::load(&_exception_cache_purge_list);
751 entry->set_purge_list_next(purge_list_head);
752 if (Atomic::cmpxchg(entry, &_exception_cache_purge_list, purge_list_head) == purge_list_head) {
753 break;
754 }
755 }
756 }
757 }
758
759 // Delete exception caches that have been concurrently unlinked,
760 // followed by a global handshake operation.
761 void CodeCache::purge_exception_caches() {
762 ExceptionCache* curr = _exception_cache_purge_list;
763 while (curr != NULL) {
764 ExceptionCache* next = curr->purge_list_next();
765 delete curr;
766 curr = next;
767 }
768 _exception_cache_purge_list = NULL;
769 }
770
771 uint8_t CodeCache::_unloading_cycle = 1;
772
|
732 CompiledMethod *nm = cb->as_compiled_method_or_null();
733 if (nm != NULL) {
734 count += nm->verify_icholder_relocations();
735 }
736 }
737 }
738 assert(count + InlineCacheBuffer::pending_icholder_count() + CompiledICHolder::live_not_claimed_count() ==
739 CompiledICHolder::live_count(), "must agree");
740 #endif
741 }
742
743 // Defer freeing of concurrently cleaned ExceptionCache entries until
744 // after a global handshake operation.
745 void CodeCache::release_exception_cache(ExceptionCache* entry) {
746 if (SafepointSynchronize::is_at_safepoint()) {
747 delete entry;
748 } else {
749 for (;;) {
750 ExceptionCache* purge_list_head = Atomic::load(&_exception_cache_purge_list);
751 entry->set_purge_list_next(purge_list_head);
752 if (Atomic::cmpxchg(&_exception_cache_purge_list, purge_list_head, entry) == purge_list_head) {
753 break;
754 }
755 }
756 }
757 }
758
759 // Delete exception caches that have been concurrently unlinked,
760 // followed by a global handshake operation.
761 void CodeCache::purge_exception_caches() {
762 ExceptionCache* curr = _exception_cache_purge_list;
763 while (curr != NULL) {
764 ExceptionCache* next = curr->purge_list_next();
765 delete curr;
766 curr = next;
767 }
768 _exception_cache_purge_list = NULL;
769 }
770
771 uint8_t CodeCache::_unloading_cycle = 1;
772
|