Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/heap.cc

Issue 6850014: Set old gen allocation limits higher for the case where new space is... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // Perform mark-sweep with optional compaction. 721 // Perform mark-sweep with optional compaction.
722 MarkCompact(tracer); 722 MarkCompact(tracer);
723 723
724 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() && 724 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() &&
725 IsStableOrIncreasingSurvivalTrend(); 725 IsStableOrIncreasingSurvivalTrend();
726 726
727 UpdateSurvivalRateTrend(start_new_space_size); 727 UpdateSurvivalRateTrend(start_new_space_size);
728 728
729 intptr_t old_gen_size = PromotedSpaceSize(); 729 intptr_t old_gen_size = PromotedSpaceSize();
730 old_gen_promotion_limit_ = 730 old_gen_promotion_limit_ =
731 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); 731 old_gen_size +
732 Max(kMinimumPromotionLimit, old_gen_size / 3) +
733 new_space()->Capacity();
732 old_gen_allocation_limit_ = 734 old_gen_allocation_limit_ =
733 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); 735 old_gen_size +
736 Max(kMinimumAllocationLimit, old_gen_size / 2) +
737 new_space()->Capacity();
734 738
735 if (high_survival_rate_during_scavenges && 739 if (high_survival_rate_during_scavenges &&
736 IsStableOrIncreasingSurvivalTrend()) { 740 IsStableOrIncreasingSurvivalTrend()) {
737 // Stable high survival rates of young objects both during partial and 741 // Stable high survival rates of young objects both during partial and
738 // full collection indicate that mutator is either building or modifying 742 // full collection indicate that mutator is either building or modifying
739 // a structure with a long lifetime. 743 // a structure with a long lifetime.
740 // In this case we aggressively raise old generation memory limits to 744 // In this case we aggressively raise old generation memory limits to
741 // postpone subsequent mark-sweep collection and thus trade memory 745 // postpone subsequent mark-sweep collection and thus trade memory
742 // space for the mutation speed. 746 // space for the mutation speed.
743 old_gen_promotion_limit_ *= 2; 747 old_gen_promotion_limit_ *= 2;
(...skipping 4925 matching lines...) Expand 10 before | Expand all | Expand 10 after
5669 void ExternalStringTable::TearDown() { 5673 void ExternalStringTable::TearDown() {
5670 new_space_strings_.Free(); 5674 new_space_strings_.Free();
5671 old_space_strings_.Free(); 5675 old_space_strings_.Free();
5672 } 5676 }
5673 5677
5674 5678
5675 List<Object*> ExternalStringTable::new_space_strings_; 5679 List<Object*> ExternalStringTable::new_space_strings_;
5676 List<Object*> ExternalStringTable::old_space_strings_; 5680 List<Object*> ExternalStringTable::old_space_strings_;
5677 5681
5678 } } // namespace v8::internal 5682 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698