< prev index next >
src/hotspot/share/gc/shared/parallelCleaning.cpp
_unloading_occurred(unloading_occurred),
_num_workers(num_workers),
_first_nmethod(NULL),
_claimed_nmethod(NULL) {
// Get first alive nmethod
! CompiledMethodIterator iter = CompiledMethodIterator();
! if(iter.next_alive()) {
_first_nmethod = iter.method();
}
_claimed_nmethod = _first_nmethod;
}
_unloading_occurred(unloading_occurred),
_num_workers(num_workers),
_first_nmethod(NULL),
_claimed_nmethod(NULL) {
// Get first alive nmethod
! CompiledMethodIterator iter(true /* only_alive */, false /* only_not_unloading */);
! if(iter.next()) {
_first_nmethod = iter.method();
}
_claimed_nmethod = _first_nmethod;
}
***************
CodeCache::verify_icholder_relocations();
}
void CodeCacheUnloadingTask::claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods) {
CompiledMethod* first;
! CompiledMethodIterator last;
do {
*num_claimed_nmethods = 0;
first = _claimed_nmethod;
! last = CompiledMethodIterator(first);
if (first != NULL) {
for (int i = 0; i < MaxClaimNmethods; i++) {
! if (!last.next_alive()) {
break;
}
claimed_nmethods[i] = last.method();
(*num_claimed_nmethods)++;
}
CodeCache::verify_icholder_relocations();
}
void CodeCacheUnloadingTask::claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods) {
CompiledMethod* first;
! CompiledMethodIterator last(true /* only_alive */, false /* only_not_unloading */);
do {
*num_claimed_nmethods = 0;
first = _claimed_nmethod;
! last = CompiledMethodIterator(true /* only_alive */, false /* only_not_unloading */, first);
if (first != NULL) {
for (int i = 0; i < MaxClaimNmethods; i++) {
! if (!last.next()) {
break;
}
claimed_nmethods[i] = last.method();
(*num_claimed_nmethods)++;
}
< prev index next >