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

Side by Side Diff: src/heap.h

Issue 14493011: Grow the old generation faster in high promotion mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 1536
1537 inline intptr_t OldGenerationCapacityAvailable() { 1537 inline intptr_t OldGenerationCapacityAvailable() {
1538 return max_old_generation_size_ - PromotedTotalSize(); 1538 return max_old_generation_size_ - PromotedTotalSize();
1539 } 1539 }
1540 1540
1541 static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize; 1541 static const intptr_t kMinimumPromotionLimit = 5 * Page::kPageSize;
1542 static const intptr_t kMinimumAllocationLimit = 1542 static const intptr_t kMinimumAllocationLimit =
1543 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); 1543 8 * (Page::kPageSize > MB ? Page::kPageSize : MB);
1544 1544
1545 intptr_t OldGenPromotionLimit(intptr_t old_gen_size) { 1545 intptr_t OldGenPromotionLimit(intptr_t old_gen_size) {
1546 const int divisor = FLAG_stress_compaction ? 10 : 3; 1546 const int divisor = FLAG_stress_compaction ? 10 :
1547 new_space_high_promotion_mode_active_ ? 1 : 3;
1547 intptr_t limit = 1548 intptr_t limit =
1548 Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit); 1549 Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit);
1549 limit += new_space_.Capacity(); 1550 limit += new_space_.Capacity();
1550 limit *= old_gen_limit_factor_; 1551 limit *= old_gen_limit_factor_;
1551 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; 1552 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
1552 return Min(limit, halfway_to_the_max); 1553 return Min(limit, halfway_to_the_max);
1553 } 1554 }
1554 1555
1555 intptr_t OldGenAllocationLimit(intptr_t old_gen_size) { 1556 intptr_t OldGenAllocationLimit(intptr_t old_gen_size) {
1556 const int divisor = FLAG_stress_compaction ? 8 : 2; 1557 const int divisor = FLAG_stress_compaction ? 8 :
1558 new_space_high_promotion_mode_active_ ? 1 : 2;
1557 intptr_t limit = 1559 intptr_t limit =
1558 Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit); 1560 Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit);
1559 limit += new_space_.Capacity(); 1561 limit += new_space_.Capacity();
1560 limit *= old_gen_limit_factor_; 1562 limit *= old_gen_limit_factor_;
1561 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; 1563 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
1562 return Min(limit, halfway_to_the_max); 1564 return Min(limit, halfway_to_the_max);
1563 } 1565 }
1564 1566
1565 // Implements the corresponding V8 API function. 1567 // Implements the corresponding V8 API function.
1566 bool IdleNotification(int hint); 1568 bool IdleNotification(int hint);
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 AssertNoAllocation no_alloc; // i.e. no gc allowed. 3022 AssertNoAllocation no_alloc; // i.e. no gc allowed.
3021 3023
3022 private: 3024 private:
3023 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3025 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3024 }; 3026 };
3025 #endif // DEBUG 3027 #endif // DEBUG
3026 3028
3027 } } // namespace v8::internal 3029 } } // namespace v8::internal
3028 3030
3029 #endif // V8_HEAP_H_ 3031 #endif // V8_HEAP_H_
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