< prev index next >

src/share/vm/gc_implementation/g1/concurrentMark.cpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.


2153     // we accumulate them in the local list and move them a few at a
2154     // time. This also cuts down on the number of notify_all() calls
2155     // we do during this process. We'll also append the local list when
2156     // _cleanup_list is empty (which means we just removed the last
2157     // region from the _cleanup_list).
2158     if ((tmp_free_list.length() % G1SecondaryFreeListAppendLength == 0) ||
2159         _cleanup_list.is_empty()) {
2160       if (G1ConcRegionFreeingVerbose) {
2161         gclog_or_tty->print_cr("G1ConcRegionFreeing [complete cleanup] : "
2162                                "appending %u entries to the secondary_free_list, "
2163                                "cleanup list still has %u entries",
2164                                tmp_free_list.length(),
2165                                _cleanup_list.length());
2166       }
2167 
2168       {
2169         MutexLockerEx x(SecondaryFreeList_lock, Mutex::_no_safepoint_check_flag);
2170         g1h->secondary_free_list_add(&tmp_free_list);
2171         SecondaryFreeList_lock->notify_all();
2172       }
2173 
2174       if (G1StressConcRegionFreeing) {
2175         for (uintx i = 0; i < G1StressConcRegionFreeingDelayMillis; ++i) {
2176           os::sleep(Thread::current(), (jlong) 1, false);
2177         }
2178       }

2179     }
2180   }
2181   assert(tmp_free_list.is_empty(), "post-condition");
2182 }
2183 
2184 // Supporting Object and Oop closures for reference discovery
2185 // and processing in during marking
2186 
2187 bool G1CMIsAliveClosure::do_object_b(oop obj) {
2188   HeapWord* addr = (HeapWord*)obj;
2189   return addr != NULL &&
2190          (!_g1->is_in_g1_reserved(addr) || !_g1->is_obj_ill(obj));
2191 }
2192 
2193 // 'Keep Alive' oop closure used by both serial parallel reference processing.
2194 // Uses the CMTask associated with a worker thread (for serial reference
2195 // processing the CMTask for worker 0 is used) to preserve (mark) and
2196 // trace referent objects.
2197 //
2198 // Using the CMTask and embedded local queues avoids having the worker




2153     // we accumulate them in the local list and move them a few at a
2154     // time. This also cuts down on the number of notify_all() calls
2155     // we do during this process. We'll also append the local list when
2156     // _cleanup_list is empty (which means we just removed the last
2157     // region from the _cleanup_list).
2158     if ((tmp_free_list.length() % G1SecondaryFreeListAppendLength == 0) ||
2159         _cleanup_list.is_empty()) {
2160       if (G1ConcRegionFreeingVerbose) {
2161         gclog_or_tty->print_cr("G1ConcRegionFreeing [complete cleanup] : "
2162                                "appending %u entries to the secondary_free_list, "
2163                                "cleanup list still has %u entries",
2164                                tmp_free_list.length(),
2165                                _cleanup_list.length());
2166       }
2167 
2168       {
2169         MutexLockerEx x(SecondaryFreeList_lock, Mutex::_no_safepoint_check_flag);
2170         g1h->secondary_free_list_add(&tmp_free_list);
2171         SecondaryFreeList_lock->notify_all();
2172       }
2173 #ifndef PRODUCT
2174       if (G1StressConcRegionFreeing) {
2175         for (uintx i = 0; i < G1StressConcRegionFreeingDelayMillis; ++i) {
2176           os::sleep(Thread::current(), (jlong) 1, false);
2177         }
2178       }
2179 #endif
2180     }
2181   }
2182   assert(tmp_free_list.is_empty(), "post-condition");
2183 }
2184 
2185 // Supporting Object and Oop closures for reference discovery
2186 // and processing in during marking
2187 
2188 bool G1CMIsAliveClosure::do_object_b(oop obj) {
2189   HeapWord* addr = (HeapWord*)obj;
2190   return addr != NULL &&
2191          (!_g1->is_in_g1_reserved(addr) || !_g1->is_obj_ill(obj));
2192 }
2193 
2194 // 'Keep Alive' oop closure used by both serial parallel reference processing.
2195 // Uses the CMTask associated with a worker thread (for serial reference
2196 // processing the CMTask for worker 0 is used) to preserve (mark) and
2197 // trace referent objects.
2198 //
2199 // Using the CMTask and embedded local queues avoids having the worker


< prev index next >