< prev index next >

src/share/vm/memory/genCollectedHeap.cpp

Print this page
rev 7522 : * * *
8066827: Remove ReferenceProcessor::clean_up_discovered_references()
Summary: Abandon rather than clean up discovered references.
Reviewed-by:


 448           // In the future this should be moved into the generation's
 449           // collect method so that ref discovery and enqueueing concerns
 450           // are local to a generation. The collect method could return
 451           // an appropriate indication in the case that notification on
 452           // the ref lock was needed. This will make the treatment of
 453           // weak refs more uniform (and indeed remove such concerns
 454           // from GCH). XXX
 455 
 456           HandleMark hm;  // Discard invalid handles created during gc
 457           save_marks();   // save marks for all gens
 458           // We want to discover references, but not process them yet.
 459           // This mode is disabled in process_discovered_references if the
 460           // generation does some collection work, or in
 461           // enqueue_discovered_references if the generation returns
 462           // without doing any work.
 463           ReferenceProcessor* rp = _gens[i]->ref_processor();
 464           // If the discovery of ("weak") refs in this generation is
 465           // atomic wrt other collectors in this configuration, we
 466           // are guaranteed to have empty discovered ref lists.
 467           if (rp->discovery_is_atomic()) {
 468             rp->enable_discovery(true /*verify_disabled*/, true /*verify_no_refs*/);
 469             rp->setup_policy(do_clear_all_soft_refs);
 470           } else {
 471             // collect() below will enable discovery as appropriate
 472           }
 473           _gens[i]->collect(full, do_clear_all_soft_refs, size, is_tlab);
 474           if (!rp->enqueuing_is_done()) {
 475             rp->enqueue_discovered_references();
 476           } else {
 477             rp->set_enqueuing_is_done(false);
 478           }
 479           rp->verify_no_references_recorded();
 480         }
 481         max_level_collected = i;
 482 
 483         // Determine if allocation request was met.
 484         if (size > 0) {
 485           if (!is_tlab || _gens[i]->supports_tlab_allocation()) {
 486             if (size*HeapWordSize <= _gens[i]->unsafe_max_alloc_nogc()) {
 487               size = 0;
 488             }




 448           // In the future this should be moved into the generation's
 449           // collect method so that ref discovery and enqueueing concerns
 450           // are local to a generation. The collect method could return
 451           // an appropriate indication in the case that notification on
 452           // the ref lock was needed. This will make the treatment of
 453           // weak refs more uniform (and indeed remove such concerns
 454           // from GCH). XXX
 455 
 456           HandleMark hm;  // Discard invalid handles created during gc
 457           save_marks();   // save marks for all gens
 458           // We want to discover references, but not process them yet.
 459           // This mode is disabled in process_discovered_references if the
 460           // generation does some collection work, or in
 461           // enqueue_discovered_references if the generation returns
 462           // without doing any work.
 463           ReferenceProcessor* rp = _gens[i]->ref_processor();
 464           // If the discovery of ("weak") refs in this generation is
 465           // atomic wrt other collectors in this configuration, we
 466           // are guaranteed to have empty discovered ref lists.
 467           if (rp->discovery_is_atomic()) {
 468             rp->enable_discovery();
 469             rp->setup_policy(do_clear_all_soft_refs);
 470           } else {
 471             // collect() below will enable discovery as appropriate
 472           }
 473           _gens[i]->collect(full, do_clear_all_soft_refs, size, is_tlab);
 474           if (!rp->enqueuing_is_done()) {
 475             rp->enqueue_discovered_references();
 476           } else {
 477             rp->set_enqueuing_is_done(false);
 478           }
 479           rp->verify_no_references_recorded();
 480         }
 481         max_level_collected = i;
 482 
 483         // Determine if allocation request was met.
 484         if (size > 0) {
 485           if (!is_tlab || _gens[i]->supports_tlab_allocation()) {
 486             if (size*HeapWordSize <= _gens[i]->unsafe_max_alloc_nogc()) {
 487               size = 0;
 488             }


< prev index next >