Mercurial > hg > truffle
comparison src/share/vm/memory/defNewGeneration.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | d166675568f6 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
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."); | |
64 _rs = (CardTableRS*)rs; | 65 _rs = (CardTableRS*)rs; |
65 } | 66 } |
66 | 67 |
67 void DefNewGeneration::KeepAliveClosure::do_oop(oop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); } | 68 void DefNewGeneration::KeepAliveClosure::do_oop(oop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); } |
68 void DefNewGeneration::KeepAliveClosure::do_oop(narrowOop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); } | 69 void DefNewGeneration::KeepAliveClosure::do_oop(narrowOop* p) { DefNewGeneration::KeepAliveClosure::do_oop_work(p); } |
616 &fsc_with_gc_barrier); | 617 &fsc_with_gc_barrier); |
617 | 618 |
618 assert(gch->no_allocs_since_save_marks(0), | 619 assert(gch->no_allocs_since_save_marks(0), |
619 "save marks have not been newly set."); | 620 "save marks have not been newly set."); |
620 | 621 |
621 int so = SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_ScavengeCodeCache; | 622 int so = SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_CodeCache; |
622 | 623 |
623 gch->gen_process_strong_roots(_level, | 624 gch->gen_process_strong_roots(_level, |
624 true, // Process younger gens, if any, | 625 true, // Process younger gens, if any, |
625 // as strong roots. | 626 // as strong roots. |
626 true, // activate StrongRootsScope | 627 true, // activate StrongRootsScope |
628 true, // is scavenging | |
627 SharedHeap::ScanningOption(so), | 629 SharedHeap::ScanningOption(so), |
628 &fsc_with_no_gc_barrier, | 630 &fsc_with_no_gc_barrier, |
631 true, // walk *all* scavengable nmethods | |
629 &fsc_with_gc_barrier, | 632 &fsc_with_gc_barrier, |
630 &klass_scan_closure); | 633 &klass_scan_closure); |
631 | 634 |
632 // "evacuate followers". | 635 // "evacuate followers". |
633 evacuate_followers.do_void(); | 636 evacuate_followers.do_void(); |
662 | 665 |
663 // A successful scavenge should restart the GC time limit count which is | 666 // A successful scavenge should restart the GC time limit count which is |
664 // for full GC's. | 667 // for full GC's. |
665 AdaptiveSizePolicy* size_policy = gch->gen_policy()->size_policy(); | 668 AdaptiveSizePolicy* size_policy = gch->gen_policy()->size_policy(); |
666 size_policy->reset_gc_overhead_limit_count(); | 669 size_policy->reset_gc_overhead_limit_count(); |
670 if (PrintGC && !PrintGCDetails) { | |
671 gch->print_heap_change(gch_prev_used); | |
672 } | |
667 assert(!gch->incremental_collection_failed(), "Should be clear"); | 673 assert(!gch->incremental_collection_failed(), "Should be clear"); |
668 } else { | 674 } else { |
669 assert(_promo_failure_scan_stack.is_empty(), "post condition"); | 675 assert(_promo_failure_scan_stack.is_empty(), "post condition"); |
670 _promo_failure_scan_stack.clear(true); // Clear cached segments. | 676 _promo_failure_scan_stack.clear(true); // Clear cached segments. |
671 | 677 |
686 _next_gen->promotion_failure_occurred(); | 692 _next_gen->promotion_failure_occurred(); |
687 gc_tracer.report_promotion_failed(_promotion_failed_info); | 693 gc_tracer.report_promotion_failed(_promotion_failed_info); |
688 | 694 |
689 // Reset the PromotionFailureALot counters. | 695 // Reset the PromotionFailureALot counters. |
690 NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();) | 696 NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();) |
691 } | |
692 if (PrintGC && !PrintGCDetails) { | |
693 gch->print_heap_change(gch_prev_used); | |
694 } | 697 } |
695 // set new iteration safe limit for the survivor spaces | 698 // set new iteration safe limit for the survivor spaces |
696 from()->set_concurrent_iteration_safe_limit(from()->top()); | 699 from()->set_concurrent_iteration_safe_limit(from()->top()); |
697 to()->set_concurrent_iteration_safe_limit(to()->top()); | 700 to()->set_concurrent_iteration_safe_limit(to()->top()); |
698 SpecializationStats::print(); | 701 SpecializationStats::print(); |
1081 | 1084 |
1082 size_t DefNewGeneration::tlab_capacity() const { | 1085 size_t DefNewGeneration::tlab_capacity() const { |
1083 return eden()->capacity(); | 1086 return eden()->capacity(); |
1084 } | 1087 } |
1085 | 1088 |
1086 size_t DefNewGeneration::tlab_used() const { | |
1087 return eden()->used(); | |
1088 } | |
1089 | |
1090 size_t DefNewGeneration::unsafe_max_tlab_alloc() const { | 1089 size_t DefNewGeneration::unsafe_max_tlab_alloc() const { |
1091 return unsafe_max_alloc_nogc(); | 1090 return unsafe_max_alloc_nogc(); |
1092 } | 1091 } |