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

Side by Side Diff: src/heap.h

Issue 9297017: R=jkummerow@chromium.org (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.7
Patch Set: Created 8 years, 11 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 | src/heap.cc » ('j') | 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 static inline void CopyBlock(Address dst, Address src, int byte_size); 1370 static inline void CopyBlock(Address dst, Address src, int byte_size);
1371 1371
1372 // Optimized version of memmove for blocks with pointer size aligned sizes and 1372 // Optimized version of memmove for blocks with pointer size aligned sizes and
1373 // pointer size aligned addresses. 1373 // pointer size aligned addresses.
1374 static inline void MoveBlock(Address dst, Address src, int byte_size); 1374 static inline void MoveBlock(Address dst, Address src, int byte_size);
1375 1375
1376 // Check new space expansion criteria and expand semispaces if it was hit. 1376 // Check new space expansion criteria and expand semispaces if it was hit.
1377 void CheckNewSpaceExpansionCriteria(); 1377 void CheckNewSpaceExpansionCriteria();
1378 1378
1379 inline void IncrementYoungSurvivorsCounter(int survived) { 1379 inline void IncrementYoungSurvivorsCounter(int survived) {
1380 ASSERT(survived >= 0);
1380 young_survivors_after_last_gc_ = survived; 1381 young_survivors_after_last_gc_ = survived;
1381 survived_since_last_expansion_ += survived; 1382 survived_since_last_expansion_ += survived;
1382 } 1383 }
1383 1384
1384 inline bool NextGCIsLikelyToBeFull() { 1385 inline bool NextGCIsLikelyToBeFull() {
1385 if (FLAG_gc_global) return true; 1386 if (FLAG_gc_global) return true;
1386 1387
1387 intptr_t total_promoted = PromotedTotalSize(); 1388 intptr_t total_promoted = PromotedTotalSize();
1388 1389
1389 intptr_t adjusted_promotion_limit = 1390 intptr_t adjusted_promotion_limit =
(...skipping 27 matching lines...) Expand all
1417 int MaxObjectSizeInNewSpace() { return kMaxObjectSizeInNewSpace; } 1418 int MaxObjectSizeInNewSpace() { return kMaxObjectSizeInNewSpace; }
1418 1419
1419 void ClearJSFunctionResultCaches(); 1420 void ClearJSFunctionResultCaches();
1420 1421
1421 void ClearNormalizedMapCaches(); 1422 void ClearNormalizedMapCaches();
1422 1423
1423 GCTracer* tracer() { return tracer_; } 1424 GCTracer* tracer() { return tracer_; }
1424 1425
1425 // Returns the size of objects residing in non new spaces. 1426 // Returns the size of objects residing in non new spaces.
1426 intptr_t PromotedSpaceSize(); 1427 intptr_t PromotedSpaceSize();
1428 intptr_t PromotedSpaceSizeOfObjects();
1427 1429
1428 double total_regexp_code_generated() { return total_regexp_code_generated_; } 1430 double total_regexp_code_generated() { return total_regexp_code_generated_; }
1429 void IncreaseTotalRegexpCodeGenerated(int size) { 1431 void IncreaseTotalRegexpCodeGenerated(int size) {
1430 total_regexp_code_generated_ += size; 1432 total_regexp_code_generated_ += size;
1431 } 1433 }
1432 1434
1433 // Returns maximum GC pause. 1435 // Returns maximum GC pause.
1434 int get_max_gc_pause() { return max_gc_pause_; } 1436 int get_max_gc_pause() { return max_gc_pause_; }
1435 1437
1436 // Returns maximum size of objects alive after GC. 1438 // Returns maximum size of objects alive after GC.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 1767
1766 // Initializes the number to string cache based on the max semispace size. 1768 // Initializes the number to string cache based on the max semispace size.
1767 MUST_USE_RESULT MaybeObject* InitializeNumberStringCache(); 1769 MUST_USE_RESULT MaybeObject* InitializeNumberStringCache();
1768 // Flush the number to string cache. 1770 // Flush the number to string cache.
1769 void FlushNumberStringCache(); 1771 void FlushNumberStringCache();
1770 1772
1771 void UpdateSurvivalRateTrend(int start_new_space_size); 1773 void UpdateSurvivalRateTrend(int start_new_space_size);
1772 1774
1773 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; 1775 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING };
1774 1776
1775 static const int kYoungSurvivalRateThreshold = 90; 1777 static const int kYoungSurvivalRateHighThreshold = 90;
1778 static const int kYoungSurvivalRateLowThreshold = 10;
1776 static const int kYoungSurvivalRateAllowedDeviation = 15; 1779 static const int kYoungSurvivalRateAllowedDeviation = 15;
1777 1780
1778 int young_survivors_after_last_gc_; 1781 int young_survivors_after_last_gc_;
1779 int high_survival_rate_period_length_; 1782 int high_survival_rate_period_length_;
1783 int low_survival_rate_period_length_;
1780 double survival_rate_; 1784 double survival_rate_;
1781 SurvivalRateTrend previous_survival_rate_trend_; 1785 SurvivalRateTrend previous_survival_rate_trend_;
1782 SurvivalRateTrend survival_rate_trend_; 1786 SurvivalRateTrend survival_rate_trend_;
1783 1787
1784 void set_survival_rate_trend(SurvivalRateTrend survival_rate_trend) { 1788 void set_survival_rate_trend(SurvivalRateTrend survival_rate_trend) {
1785 ASSERT(survival_rate_trend != FLUCTUATING); 1789 ASSERT(survival_rate_trend != FLUCTUATING);
1786 previous_survival_rate_trend_ = survival_rate_trend_; 1790 previous_survival_rate_trend_ = survival_rate_trend_;
1787 survival_rate_trend_ = survival_rate_trend; 1791 survival_rate_trend_ = survival_rate_trend;
1788 } 1792 }
1789 1793
(...skipping 12 matching lines...) Expand all
1802 bool IsStableOrIncreasingSurvivalTrend() { 1806 bool IsStableOrIncreasingSurvivalTrend() {
1803 switch (survival_rate_trend()) { 1807 switch (survival_rate_trend()) {
1804 case STABLE: 1808 case STABLE:
1805 case INCREASING: 1809 case INCREASING:
1806 return true; 1810 return true;
1807 default: 1811 default:
1808 return false; 1812 return false;
1809 } 1813 }
1810 } 1814 }
1811 1815
1816 bool IsStableOrDecreasingSurvivalTrend() {
1817 switch (survival_rate_trend()) {
1818 case STABLE:
1819 case DECREASING:
1820 return true;
1821 default:
1822 return false;
1823 }
1824 }
1825
1812 bool IsIncreasingSurvivalTrend() { 1826 bool IsIncreasingSurvivalTrend() {
1813 return survival_rate_trend() == INCREASING; 1827 return survival_rate_trend() == INCREASING;
1814 } 1828 }
1815 1829
1816 bool IsDecreasingSurvivalTrend() { 1830 bool IsHighSurvivalRate() {
1817 return survival_rate_trend() == DECREASING; 1831 return high_survival_rate_period_length_ > 0;
1818 } 1832 }
1819 1833
1820 bool IsHighSurvivalRate() { 1834 bool IsLowSurvivalRate() {
1821 return high_survival_rate_period_length_ > 0; 1835 return low_survival_rate_period_length_ > 0;
1822 } 1836 }
1823 1837
1824 void SelectScavengingVisitorsTable(); 1838 void SelectScavengingVisitorsTable();
1825 1839
1826 static const int kInitialSymbolTableSize = 2048; 1840 static const int kInitialSymbolTableSize = 2048;
1827 static const int kInitialEvalCacheSize = 64; 1841 static const int kInitialEvalCacheSize = 64;
1828 1842
1829 // Maximum GC pause. 1843 // Maximum GC pause.
1830 int max_gc_pause_; 1844 int max_gc_pause_;
1831 1845
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 2569
2556 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2570 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2557 }; 2571 };
2558 #endif // DEBUG || LIVE_OBJECT_LIST 2572 #endif // DEBUG || LIVE_OBJECT_LIST
2559 2573
2560 } } // namespace v8::internal 2574 } } // namespace v8::internal
2561 2575
2562 #undef HEAP 2576 #undef HEAP
2563 2577
2564 #endif // V8_HEAP_H_ 2578 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698