< prev index next >

src/share/vm/gc/shared/referenceProcessor.cpp

Print this page
rev 9752 : imported patch fix


 226 
 227   update_soft_ref_master_clock();
 228 
 229   // Weak references
 230   {
 231     GCTraceTime(Debug, gc, ref) tt("WeakReference", gc_timer);
 232     process_discovered_reflist(_discoveredWeakRefs, NULL, true,
 233                                is_alive, keep_alive, complete_gc, task_executor);
 234   }
 235 
 236   // Final references
 237   {
 238   GCTraceTime(Debug, gc, ref) tt("FinalReference", gc_timer);
 239     process_discovered_reflist(_discoveredFinalRefs, NULL, false,
 240                                is_alive, keep_alive, complete_gc, task_executor);
 241   }
 242 
 243   // Phantom references
 244   {
 245     GCTraceTime(Debug, gc, ref) tt("PhantomReference", gc_timer);
 246     process_discovered_reflist(_discoveredPhantomRefs, NULL, false,
 247                                is_alive, keep_alive, complete_gc, task_executor);
 248 
 249     // Process cleaners, but include them in phantom timing.  We expect
 250     // Cleaner references to be temporary, and don't want to deal with
 251     // possible incompatibilities arising from making it more visible.
 252     process_discovered_reflist(_discoveredCleanerRefs, NULL, true,
 253                                  is_alive, keep_alive, complete_gc, task_executor);
 254   }
 255 
 256   // Weak global JNI references. It would make more sense (semantically) to
 257   // traverse these simultaneously with the regular weak references above, but
 258   // that is not how the JDK1.2 specification is. See #4126360. Native code can
 259   // thus use JNI weak references to circumvent the phantom references and
 260   // resurrect a "post-mortem" object.
 261   {
 262     GCTraceTime(Debug, gc, ref) tt("JNI Weak Reference", gc_timer);
 263     if (task_executor != NULL) {
 264       task_executor->set_single_threaded_mode();
 265     }
 266     process_phaseJNI(is_alive, keep_alive, complete_gc);




 226 
 227   update_soft_ref_master_clock();
 228 
 229   // Weak references
 230   {
 231     GCTraceTime(Debug, gc, ref) tt("WeakReference", gc_timer);
 232     process_discovered_reflist(_discoveredWeakRefs, NULL, true,
 233                                is_alive, keep_alive, complete_gc, task_executor);
 234   }
 235 
 236   // Final references
 237   {
 238     GCTraceTime(Debug, gc, ref) tt("FinalReference", gc_timer);
 239     process_discovered_reflist(_discoveredFinalRefs, NULL, false,
 240                                is_alive, keep_alive, complete_gc, task_executor);
 241   }
 242 
 243   // Phantom references
 244   {
 245     GCTraceTime(Debug, gc, ref) tt("PhantomReference", gc_timer);
 246     process_discovered_reflist(_discoveredPhantomRefs, NULL, true,
 247                                is_alive, keep_alive, complete_gc, task_executor);
 248 
 249     // Process cleaners, but include them in phantom timing.  We expect
 250     // Cleaner references to be temporary, and don't want to deal with
 251     // possible incompatibilities arising from making it more visible.
 252     process_discovered_reflist(_discoveredCleanerRefs, NULL, true,
 253                                  is_alive, keep_alive, complete_gc, task_executor);
 254   }
 255 
 256   // Weak global JNI references. It would make more sense (semantically) to
 257   // traverse these simultaneously with the regular weak references above, but
 258   // that is not how the JDK1.2 specification is. See #4126360. Native code can
 259   // thus use JNI weak references to circumvent the phantom references and
 260   // resurrect a "post-mortem" object.
 261   {
 262     GCTraceTime(Debug, gc, ref) tt("JNI Weak Reference", gc_timer);
 263     if (task_executor != NULL) {
 264       task_executor->set_single_threaded_mode();
 265     }
 266     process_phaseJNI(is_alive, keep_alive, complete_gc);


< prev index next >