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

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

Issue 1311993003: Reland "Make sure that memory reducer makes progress in incremental marking"" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 5 years, 3 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 #include <map> 9 #include <map>
10 10
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 // prepared by finishing the previous one. 1029 // prepared by finishing the previous one.
1030 void PrepareArrayBufferDiscoveryInNewSpace(); 1030 void PrepareArrayBufferDiscoveryInNewSpace();
1031 1031
1032 // An ArrayBuffer moved from new space to old space. 1032 // An ArrayBuffer moved from new space to old space.
1033 void PromoteArrayBuffer(Object* buffer); 1033 void PromoteArrayBuffer(Object* buffer);
1034 1034
1035 bool HasLowAllocationRate(); 1035 bool HasLowAllocationRate();
1036 bool HasHighFragmentation(); 1036 bool HasHighFragmentation();
1037 bool HasHighFragmentation(intptr_t used, intptr_t committed); 1037 bool HasHighFragmentation(intptr_t used, intptr_t committed);
1038 1038
1039 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; }
1040
1039 // =========================================================================== 1041 // ===========================================================================
1040 // Initialization. =========================================================== 1042 // Initialization. ===========================================================
1041 // =========================================================================== 1043 // ===========================================================================
1042 1044
1043 // Configure heap size in MB before setup. Return false if the heap has been 1045 // Configure heap size in MB before setup. Return false if the heap has been
1044 // set up already. 1046 // set up already.
1045 bool ConfigureHeap(int max_semi_space_size, int max_old_space_size, 1047 bool ConfigureHeap(int max_semi_space_size, int max_old_space_size,
1046 int max_executable_size, size_t code_range_size); 1048 int max_executable_size, size_t code_range_size);
1047 bool ConfigureHeapDefault(); 1049 bool ConfigureHeapDefault();
1048 1050
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 1289
1288 // Performs incremental marking steps of step_size_in_bytes as long as 1290 // Performs incremental marking steps of step_size_in_bytes as long as
1289 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute 1291 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute
1290 // an estimate increment. Returns the remaining time that cannot be used 1292 // an estimate increment. Returns the remaining time that cannot be used
1291 // for incremental marking anymore because a single step would exceed the 1293 // for incremental marking anymore because a single step would exceed the
1292 // deadline. 1294 // deadline.
1293 double AdvanceIncrementalMarking( 1295 double AdvanceIncrementalMarking(
1294 intptr_t step_size_in_bytes, double deadline_in_ms, 1296 intptr_t step_size_in_bytes, double deadline_in_ms,
1295 IncrementalMarking::StepActions step_actions); 1297 IncrementalMarking::StepActions step_actions);
1296 1298
1299 void FinalizeIncrementalMarkingIfComplete(const char* comment);
1300
1297 IncrementalMarking* incremental_marking() { return &incremental_marking_; } 1301 IncrementalMarking* incremental_marking() { return &incremental_marking_; }
1298 1302
1299 // =========================================================================== 1303 // ===========================================================================
1300 // External string table API. ================================================ 1304 // External string table API. ================================================
1301 // =========================================================================== 1305 // ===========================================================================
1302 1306
1303 // Registers an external string. 1307 // Registers an external string.
1304 inline void RegisterExternalString(String* string); 1308 inline void RegisterExternalString(String* string);
1305 1309
1306 // Finalizes an external string by deleting the associated external 1310 // Finalizes an external string by deleting the associated external
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2746 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2743 2747
2744 private: 2748 private:
2745 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2749 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2746 }; 2750 };
2747 #endif // DEBUG 2751 #endif // DEBUG
2748 } 2752 }
2749 } // namespace v8::internal 2753 } // namespace v8::internal
2750 2754
2751 #endif // V8_HEAP_HEAP_H_ 2755 #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