comparison src/share/vm/memory/defNewGeneration.cpp @ 14518:d8041d695d19

Merged with jdk9/dev/hotspot changeset 3812c088b945
author twisti
date Tue, 11 Mar 2014 18:45:59 -0700
parents d166675568f6
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14141:f97c5ec83832 14518:d8041d695d19
59 } 59 }
60 60
61 DefNewGeneration::KeepAliveClosure:: 61 DefNewGeneration::KeepAliveClosure::
62 KeepAliveClosure(ScanWeakRefClosure* cl) : _cl(cl) { 62 KeepAliveClosure(ScanWeakRefClosure* cl) : _cl(cl) {
63 GenRemSet* rs = GenCollectedHeap::heap()->rem_set(); 63 GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
64 assert(rs->rs_kind() == GenRemSet::CardTable, "Wrong rem set kind.");
65 _rs = (CardTableRS*)rs; 64 _rs = (CardTableRS*)rs;
66 } 65 }
67 66
68 void DefNewGeneration::KeepAliveClosure::do_oop(oop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); } 67 void DefNewGeneration::KeepAliveClosure::do_oop(oop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); }
69 void DefNewGeneration::KeepAliveClosure::do_oop(narrowOop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); } 68 void DefNewGeneration::KeepAliveClosure::do_oop(narrowOop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); }
617 &fsc_with_gc_barrier); 616 &fsc_with_gc_barrier);
618 617
619 assert(gch->no_allocs_since_save_marks(0), 618 assert(gch->no_allocs_since_save_marks(0),
620 "save marks have not been newly set."); 619 "save marks have not been newly set.");
621 620
622 int so = SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_CodeCache; 621 int so = SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_ScavengeCodeCache;
623 622
624 gch->gen_process_strong_roots(_level, 623 gch->gen_process_strong_roots(_level,
625 true, // Process younger gens, if any, 624 true, // Process younger gens, if any,
626 // as strong roots. 625 // as strong roots.
627 true, // activate StrongRootsScope 626 true, // activate StrongRootsScope
628 true, // is scavenging
629 SharedHeap::ScanningOption(so), 627 SharedHeap::ScanningOption(so),
630 &fsc_with_no_gc_barrier, 628 &fsc_with_no_gc_barrier,
631 true, // walk *all* scavengable nmethods
632 &fsc_with_gc_barrier, 629 &fsc_with_gc_barrier,
633 &klass_scan_closure); 630 &klass_scan_closure);
634 631
635 // "evacuate followers". 632 // "evacuate followers".
636 evacuate_followers.do_void(); 633 evacuate_followers.do_void();
665 662
666 // A successful scavenge should restart the GC time limit count which is 663 // A successful scavenge should restart the GC time limit count which is
667 // for full GC's. 664 // for full GC's.
668 AdaptiveSizePolicy* size_policy = gch->gen_policy()->size_policy(); 665 AdaptiveSizePolicy* size_policy = gch->gen_policy()->size_policy();
669 size_policy->reset_gc_overhead_limit_count(); 666 size_policy->reset_gc_overhead_limit_count();
670 if (PrintGC && !PrintGCDetails) {
671 gch->print_heap_change(gch_prev_used);
672 }
673 assert(!gch->incremental_collection_failed(), "Should be clear"); 667 assert(!gch->incremental_collection_failed(), "Should be clear");
674 } else { 668 } else {
675 assert(_promo_failure_scan_stack.is_empty(), "post condition"); 669 assert(_promo_failure_scan_stack.is_empty(), "post condition");
676 _promo_failure_scan_stack.clear(true); // Clear cached segments. 670 _promo_failure_scan_stack.clear(true); // Clear cached segments.
677 671
692 _next_gen->promotion_failure_occurred(); 686 _next_gen->promotion_failure_occurred();
693 gc_tracer.report_promotion_failed(_promotion_failed_info); 687 gc_tracer.report_promotion_failed(_promotion_failed_info);
694 688
695 // Reset the PromotionFailureALot counters. 689 // Reset the PromotionFailureALot counters.
696 NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();) 690 NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();)
691 }
692 if (PrintGC && !PrintGCDetails) {
693 gch->print_heap_change(gch_prev_used);
697 } 694 }
698 // set new iteration safe limit for the survivor spaces 695 // set new iteration safe limit for the survivor spaces
699 from()->set_concurrent_iteration_safe_limit(from()->top()); 696 from()->set_concurrent_iteration_safe_limit(from()->top());
700 to()->set_concurrent_iteration_safe_limit(to()->top()); 697 to()->set_concurrent_iteration_safe_limit(to()->top());
701 SpecializationStats::print(); 698 SpecializationStats::print();
1084 1081
1085 size_t DefNewGeneration::tlab_capacity() const { 1082 size_t DefNewGeneration::tlab_capacity() const {
1086 return eden()->capacity(); 1083 return eden()->capacity();
1087 } 1084 }
1088 1085
1086 size_t DefNewGeneration::tlab_used() const {
1087 return eden()->used();
1088 }
1089
1089 size_t DefNewGeneration::unsafe_max_tlab_alloc() const { 1090 size_t DefNewGeneration::unsafe_max_tlab_alloc() const {
1090 return unsafe_max_alloc_nogc(); 1091 return unsafe_max_alloc_nogc();
1091 } 1092 }