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

Side by Side Diff: src/heap.h

Issue 423303006: Make sure that there is enough time left before finishing incremental marking in idle notification. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « src/gc-tracer.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')
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 "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 int freed_global_handles); 1083 int freed_global_handles);
1084 1084
1085 // Indicates whether inline bump-pointer allocation has been disabled. 1085 // Indicates whether inline bump-pointer allocation has been disabled.
1086 bool inline_allocation_disabled() { return inline_allocation_disabled_; } 1086 bool inline_allocation_disabled() { return inline_allocation_disabled_; }
1087 1087
1088 // Switch whether inline bump-pointer allocation should be used. 1088 // Switch whether inline bump-pointer allocation should be used.
1089 void EnableInlineAllocation(); 1089 void EnableInlineAllocation();
1090 void DisableInlineAllocation(); 1090 void DisableInlineAllocation();
1091 1091
1092 // Implements the corresponding V8 API function. 1092 // Implements the corresponding V8 API function.
1093 bool IdleNotification(int hint); 1093 bool IdleNotification(int idle_time_in_ms);
1094 1094
1095 // Declare all the root indices. This defines the root list order. 1095 // Declare all the root indices. This defines the root list order.
1096 enum RootListIndex { 1096 enum RootListIndex {
1097 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 1097 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1098 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION) 1098 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION)
1099 #undef ROOT_INDEX_DECLARATION 1099 #undef ROOT_INDEX_DECLARATION
1100 1100
1101 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, 1101 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
1102 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION) 1102 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION)
1103 #undef STRING_DECLARATION 1103 #undef STRING_DECLARATION
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 int TimeMarkSweepWouldTakeInMs() { 2058 int TimeMarkSweepWouldTakeInMs() {
2059 // Rough estimate of how many megabytes of heap can be processed in 1 ms. 2059 // Rough estimate of how many megabytes of heap can be processed in 1 ms.
2060 static const int kMbPerMs = 2; 2060 static const int kMbPerMs = 2;
2061 2061
2062 int heap_size_mb = static_cast<int>(SizeOfObjects() / MB); 2062 int heap_size_mb = static_cast<int>(SizeOfObjects() / MB);
2063 return heap_size_mb / kMbPerMs; 2063 return heap_size_mb / kMbPerMs;
2064 } 2064 }
2065 2065
2066 void AdvanceIdleIncrementalMarking(intptr_t step_size); 2066 void AdvanceIdleIncrementalMarking(intptr_t step_size);
2067 2067
2068 void FinalizeIdleIncrementalMarking();
2069
2068 void ClearObjectStats(bool clear_last_time_stats = false); 2070 void ClearObjectStats(bool clear_last_time_stats = false);
2069 2071
2070 void set_weak_object_to_code_table(Object* value) { 2072 void set_weak_object_to_code_table(Object* value) {
2071 ASSERT(!InNewSpace(value)); 2073 ASSERT(!InNewSpace(value));
2072 weak_object_to_code_table_ = value; 2074 weak_object_to_code_table_ = value;
2073 } 2075 }
2074 2076
2075 Object** weak_object_to_code_table_address() { 2077 Object** weak_object_to_code_table_address() {
2076 return &weak_object_to_code_table_; 2078 return &weak_object_to_code_table_;
2077 } 2079 }
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2641 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2640 2642
2641 private: 2643 private:
2642 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2644 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2643 }; 2645 };
2644 #endif // DEBUG 2646 #endif // DEBUG
2645 2647
2646 } } // namespace v8::internal 2648 } } // namespace v8::internal
2647 2649
2648 #endif // V8_HEAP_H_ 2650 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/gc-tracer.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698