src/share/vm/memory/sharedHeap.cpp

Print this page
rev 2652 : 7085906: Replace the permgen allocated sentinelRef with a self-looped end
Summary: Remove the sentinelRef and let the last Reference in a discovered chain point back to itself.
Reviewed-by: TBD1, TBD2


 129   if (_active) {
 130     outer->change_strong_roots_parity();
 131   }
 132 }
 133 
 134 SharedHeap::StrongRootsScope::~StrongRootsScope() {
 135   // nothing particular
 136 }
 137 
 138 void SharedHeap::process_strong_roots(bool activate_scope,
 139                                       bool collecting_perm_gen,
 140                                       ScanningOption so,
 141                                       OopClosure* roots,
 142                                       CodeBlobClosure* code_roots,
 143                                       OopsInGenClosure* perm_blk) {
 144   StrongRootsScope srs(this, activate_scope);
 145   // General strong roots.
 146   assert(_strong_roots_parity != 0, "must have called prologue code");
 147   if (!_process_strong_tasks->is_task_claimed(SH_PS_Universe_oops_do)) {
 148     Universe::oops_do(roots);
 149     ReferenceProcessor::oops_do(roots);
 150     // Consider perm-gen discovered lists to be strong.
 151     perm_gen()->ref_processor()->weak_oops_do(roots);
 152   }
 153   // Global (strong) JNI handles
 154   if (!_process_strong_tasks->is_task_claimed(SH_PS_JNIHandles_oops_do))
 155     JNIHandles::oops_do(roots);
 156   // All threads execute this; the individual threads are task groups.
 157   if (ParallelGCThreads > 0) {
 158     Threads::possibly_parallel_oops_do(roots, code_roots);
 159   } else {
 160     Threads::oops_do(roots, code_roots);
 161   }
 162   if (!_process_strong_tasks-> is_task_claimed(SH_PS_ObjectSynchronizer_oops_do))
 163     ObjectSynchronizer::oops_do(roots);
 164   if (!_process_strong_tasks->is_task_claimed(SH_PS_FlatProfiler_oops_do))
 165     FlatProfiler::oops_do(roots);
 166   if (!_process_strong_tasks->is_task_claimed(SH_PS_Management_oops_do))
 167     Management::oops_do(roots);
 168   if (!_process_strong_tasks->is_task_claimed(SH_PS_jvmti_oops_do))
 169     JvmtiExport::oops_do(roots);




 129   if (_active) {
 130     outer->change_strong_roots_parity();
 131   }
 132 }
 133 
 134 SharedHeap::StrongRootsScope::~StrongRootsScope() {
 135   // nothing particular
 136 }
 137 
 138 void SharedHeap::process_strong_roots(bool activate_scope,
 139                                       bool collecting_perm_gen,
 140                                       ScanningOption so,
 141                                       OopClosure* roots,
 142                                       CodeBlobClosure* code_roots,
 143                                       OopsInGenClosure* perm_blk) {
 144   StrongRootsScope srs(this, activate_scope);
 145   // General strong roots.
 146   assert(_strong_roots_parity != 0, "must have called prologue code");
 147   if (!_process_strong_tasks->is_task_claimed(SH_PS_Universe_oops_do)) {
 148     Universe::oops_do(roots);

 149     // Consider perm-gen discovered lists to be strong.
 150     perm_gen()->ref_processor()->weak_oops_do(roots);
 151   }
 152   // Global (strong) JNI handles
 153   if (!_process_strong_tasks->is_task_claimed(SH_PS_JNIHandles_oops_do))
 154     JNIHandles::oops_do(roots);
 155   // All threads execute this; the individual threads are task groups.
 156   if (ParallelGCThreads > 0) {
 157     Threads::possibly_parallel_oops_do(roots, code_roots);
 158   } else {
 159     Threads::oops_do(roots, code_roots);
 160   }
 161   if (!_process_strong_tasks-> is_task_claimed(SH_PS_ObjectSynchronizer_oops_do))
 162     ObjectSynchronizer::oops_do(roots);
 163   if (!_process_strong_tasks->is_task_claimed(SH_PS_FlatProfiler_oops_do))
 164     FlatProfiler::oops_do(roots);
 165   if (!_process_strong_tasks->is_task_claimed(SH_PS_Management_oops_do))
 166     Management::oops_do(roots);
 167   if (!_process_strong_tasks->is_task_claimed(SH_PS_jvmti_oops_do))
 168     JvmtiExport::oops_do(roots);