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

Side by Side Diff: src/heap/heap.h

Issue 1094843002: Rename some things around incremental marking triggers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/heap/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_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 inline void IncrementNodesCopiedInNewSpace() { nodes_copied_in_new_space_++; } 1234 inline void IncrementNodesCopiedInNewSpace() { nodes_copied_in_new_space_++; }
1235 1235
1236 inline void IncrementNodesPromoted() { nodes_promoted_++; } 1236 inline void IncrementNodesPromoted() { nodes_promoted_++; }
1237 1237
1238 inline void IncrementYoungSurvivorsCounter(int survived) { 1238 inline void IncrementYoungSurvivorsCounter(int survived) {
1239 DCHECK(survived >= 0); 1239 DCHECK(survived >= 0);
1240 survived_last_scavenge_ = survived; 1240 survived_last_scavenge_ = survived;
1241 survived_since_last_expansion_ += survived; 1241 survived_since_last_expansion_ += survived;
1242 } 1242 }
1243 1243
1244 inline bool NextGCIsLikelyToBeFull(intptr_t limit) { 1244 inline bool HeapIsFullEnoughToStartIncrementalMarking(intptr_t limit) {
Hannes Payer (out of office) 2015/04/17 10:48:17 I don't feel strong about the function name.
1245 if (FLAG_gc_global) return true;
Erik Corry Chromium.org 2015/04/17 10:40:41 This is the only functional change. Previously, in
Hannes Payer (out of office) 2015/04/17 10:48:17 Acknowledged.
titzer 2015/04/20 12:47:24 Your CL description claimed this was a refactoring
1246
1247 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true; 1245 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true;
1248 1246
1249 intptr_t adjusted_allocation_limit = limit - new_space_.Capacity(); 1247 intptr_t adjusted_allocation_limit = limit - new_space_.Capacity();
1250 1248
1251 if (PromotedTotalSize() >= adjusted_allocation_limit) return true; 1249 if (PromotedTotalSize() >= adjusted_allocation_limit) return true;
1252 1250
1253 return false; 1251 return false;
1254 } 1252 }
1255 1253
1256 void UpdateNewSpaceReferencesInExternalStringTable( 1254 void UpdateNewSpaceReferencesInExternalStringTable(
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 void ConfigureInitialOldGenerationSize(); 2074 void ConfigureInitialOldGenerationSize();
2077 2075
2078 void SelectScavengingVisitorsTable(); 2076 void SelectScavengingVisitorsTable();
2079 2077
2080 void IdleMarkCompact(const char* message); 2078 void IdleMarkCompact(const char* message);
2081 2079
2082 bool TryFinalizeIdleIncrementalMarking( 2080 bool TryFinalizeIdleIncrementalMarking(
2083 double idle_time_in_ms, size_t size_of_objects, 2081 double idle_time_in_ms, size_t size_of_objects,
2084 size_t mark_compact_speed_in_bytes_per_ms); 2082 size_t mark_compact_speed_in_bytes_per_ms);
2085 2083
2086 bool WorthActivatingIncrementalMarking();
2087
2088 void ClearObjectStats(bool clear_last_time_stats = false); 2084 void ClearObjectStats(bool clear_last_time_stats = false);
2089 2085
2090 inline void UpdateAllocationsHash(HeapObject* object); 2086 inline void UpdateAllocationsHash(HeapObject* object);
2091 inline void UpdateAllocationsHash(uint32_t value); 2087 inline void UpdateAllocationsHash(uint32_t value);
2092 inline void PrintAlloctionsHash(); 2088 inline void PrintAlloctionsHash();
2093 2089
2094 // Object counts and used memory by InstanceType 2090 // Object counts and used memory by InstanceType
2095 size_t object_counts_[OBJECT_STATS_COUNT]; 2091 size_t object_counts_[OBJECT_STATS_COUNT];
2096 size_t object_counts_last_time_[OBJECT_STATS_COUNT]; 2092 size_t object_counts_last_time_[OBJECT_STATS_COUNT];
2097 size_t object_sizes_[OBJECT_STATS_COUNT]; 2093 size_t object_sizes_[OBJECT_STATS_COUNT];
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2626 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2622 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2627 2623
2628 private: 2624 private:
2629 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2625 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2630 }; 2626 };
2631 #endif // DEBUG 2627 #endif // DEBUG
2632 } 2628 }
2633 } // namespace v8::internal 2629 } // namespace v8::internal
2634 2630
2635 #endif // V8_HEAP_HEAP_H_ 2631 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698