53 StringDedup::parallel_unlink(&_dedup_closure, worker_id); 54 } 55 } 56 57 CodeCacheUnloadingTask::CodeCacheUnloadingTask(uint num_workers, BoolObjectClosure* is_alive, bool unloading_occurred) : 58 _unloading_scope(is_alive), 59 _unloading_occurred(unloading_occurred), 60 _num_workers(num_workers), 61 _first_nmethod(NULL), 62 _claimed_nmethod(NULL) { 63 // Get first alive nmethod 64 CompiledMethodIterator iter(CompiledMethodIterator::only_alive); 65 if(iter.next()) { 66 _first_nmethod = iter.method(); 67 } 68 _claimed_nmethod = _first_nmethod; 69 } 70 71 CodeCacheUnloadingTask::~CodeCacheUnloadingTask() { 72 CodeCache::verify_clean_inline_caches(); 73 74 guarantee(CodeCache::scavenge_root_nmethods() == NULL, "Must be"); 75 76 CodeCache::verify_icholder_relocations(); 77 } 78 79 void CodeCacheUnloadingTask::claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods) { 80 CompiledMethod* first; 81 CompiledMethodIterator last(CompiledMethodIterator::only_alive); 82 83 do { 84 *num_claimed_nmethods = 0; 85 86 first = _claimed_nmethod; 87 last = CompiledMethodIterator(CompiledMethodIterator::only_alive, first); 88 89 if (first != NULL) { 90 91 for (int i = 0; i < MaxClaimNmethods; i++) { 92 if (!last.next()) { 93 break; 94 } 95 claimed_nmethods[i] = last.method(); | 53 StringDedup::parallel_unlink(&_dedup_closure, worker_id); 54 } 55 } 56 57 CodeCacheUnloadingTask::CodeCacheUnloadingTask(uint num_workers, BoolObjectClosure* is_alive, bool unloading_occurred) : 58 _unloading_scope(is_alive), 59 _unloading_occurred(unloading_occurred), 60 _num_workers(num_workers), 61 _first_nmethod(NULL), 62 _claimed_nmethod(NULL) { 63 // Get first alive nmethod 64 CompiledMethodIterator iter(CompiledMethodIterator::only_alive); 65 if(iter.next()) { 66 _first_nmethod = iter.method(); 67 } 68 _claimed_nmethod = _first_nmethod; 69 } 70 71 CodeCacheUnloadingTask::~CodeCacheUnloadingTask() { 72 CodeCache::verify_clean_inline_caches(); 73 CodeCache::verify_icholder_relocations(); 74 } 75 76 void CodeCacheUnloadingTask::claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods) { 77 CompiledMethod* first; 78 CompiledMethodIterator last(CompiledMethodIterator::only_alive); 79 80 do { 81 *num_claimed_nmethods = 0; 82 83 first = _claimed_nmethod; 84 last = CompiledMethodIterator(CompiledMethodIterator::only_alive, first); 85 86 if (first != NULL) { 87 88 for (int i = 0; i < MaxClaimNmethods; i++) { 89 if (!last.next()) { 90 break; 91 } 92 claimed_nmethods[i] = last.method(); |