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

Side by Side Diff: src/heap.h

Issue 309623007: Tenure allocation sites only when semi-space is maximum size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_H_ 5 #ifndef V8_HEAP_H_
6 #define V8_HEAP_H_ 6 #define V8_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 } 1352 }
1353 1353
1354 bool flush_monomorphic_ics() { return flush_monomorphic_ics_; } 1354 bool flush_monomorphic_ics() { return flush_monomorphic_ics_; }
1355 1355
1356 int64_t amount_of_external_allocated_memory() { 1356 int64_t amount_of_external_allocated_memory() {
1357 return amount_of_external_allocated_memory_; 1357 return amount_of_external_allocated_memory_;
1358 } 1358 }
1359 1359
1360 void DeoptMarkedAllocationSites(); 1360 void DeoptMarkedAllocationSites();
1361 1361
1362 bool MaximumSizeScavenge() {
1363 return maximum_size_scavenges_ > 0;
1364 }
1365
1362 // ObjectStats are kept in two arrays, counts and sizes. Related stats are 1366 // ObjectStats are kept in two arrays, counts and sizes. Related stats are
1363 // stored in a contiguous linear buffer. Stats groups are stored one after 1367 // stored in a contiguous linear buffer. Stats groups are stored one after
1364 // another. 1368 // another.
1365 enum { 1369 enum {
1366 FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1, 1370 FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1,
1367 FIRST_FIXED_ARRAY_SUB_TYPE = 1371 FIRST_FIXED_ARRAY_SUB_TYPE =
1368 FIRST_CODE_KIND_SUB_TYPE + Code::NUMBER_OF_KINDS, 1372 FIRST_CODE_KIND_SUB_TYPE + Code::NUMBER_OF_KINDS,
1369 FIRST_CODE_AGE_SUB_TYPE = 1373 FIRST_CODE_AGE_SUB_TYPE =
1370 FIRST_FIXED_ARRAY_SUB_TYPE + LAST_FIXED_ARRAY_SUB_TYPE + 1, 1374 FIRST_FIXED_ARRAY_SUB_TYPE + LAST_FIXED_ARRAY_SUB_TYPE + 1,
1371 OBJECT_STATS_COUNT = FIRST_CODE_AGE_SUB_TYPE + Code::kCodeAgeCount + 1 1375 OBJECT_STATS_COUNT = FIRST_CODE_AGE_SUB_TYPE + Code::kCodeAgeCount + 1
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 static const int kYoungSurvivalRateAllowedDeviation = 15; 2016 static const int kYoungSurvivalRateAllowedDeviation = 15;
2013 2017
2014 static const int kOldSurvivalRateLowThreshold = 10; 2018 static const int kOldSurvivalRateLowThreshold = 10;
2015 2019
2016 int high_survival_rate_period_length_; 2020 int high_survival_rate_period_length_;
2017 intptr_t promoted_objects_size_; 2021 intptr_t promoted_objects_size_;
2018 double promotion_rate_; 2022 double promotion_rate_;
2019 intptr_t semi_space_copied_object_size_; 2023 intptr_t semi_space_copied_object_size_;
2020 double semi_space_copied_rate_; 2024 double semi_space_copied_rate_;
2021 2025
2026 // This is the pretenuring trigger for allocation sites that are in maybe
2027 // tenure state. When we switched to the maximum new space size we deoptimize
2028 // the code that belongs to the allocation site and derive the lifetime
2029 // of the allocation site.
2030 unsigned int maximum_size_scavenges_;
2031
2022 // TODO(hpayer): Allocation site pretenuring may make this method obsolete. 2032 // TODO(hpayer): Allocation site pretenuring may make this method obsolete.
2023 // Re-visit incremental marking heuristics. 2033 // Re-visit incremental marking heuristics.
2024 bool IsHighSurvivalRate() { 2034 bool IsHighSurvivalRate() {
2025 return high_survival_rate_period_length_ > 0; 2035 return high_survival_rate_period_length_ > 0;
2026 } 2036 }
2027 2037
2028 void SelectScavengingVisitorsTable(); 2038 void SelectScavengingVisitorsTable();
2029 2039
2030 void StartIdleRound() { 2040 void StartIdleRound() {
2031 mark_sweeps_since_idle_round_started_ = 0; 2041 mark_sweeps_since_idle_round_started_ = 0;
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2771 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2762 2772
2763 private: 2773 private:
2764 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2774 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2765 }; 2775 };
2766 #endif // DEBUG 2776 #endif // DEBUG
2767 2777
2768 } } // namespace v8::internal 2778 } } // namespace v8::internal
2769 2779
2770 #endif // V8_HEAP_H_ 2780 #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