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

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

Issue 465473002: Use actual incremental marking throughput in IdleNotification to estimate marking step size. (Closed) 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/heap/gc-idle-time-handler.cc ('k') | 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 int freed_global_handles); 1043 int freed_global_handles);
1044 1044
1045 // Indicates whether inline bump-pointer allocation has been disabled. 1045 // Indicates whether inline bump-pointer allocation has been disabled.
1046 bool inline_allocation_disabled() { return inline_allocation_disabled_; } 1046 bool inline_allocation_disabled() { return inline_allocation_disabled_; }
1047 1047
1048 // Switch whether inline bump-pointer allocation should be used. 1048 // Switch whether inline bump-pointer allocation should be used.
1049 void EnableInlineAllocation(); 1049 void EnableInlineAllocation();
1050 void DisableInlineAllocation(); 1050 void DisableInlineAllocation();
1051 1051
1052 // Implements the corresponding V8 API function. 1052 // Implements the corresponding V8 API function.
1053 bool IdleNotification(int hint); 1053 bool IdleNotification(int idle_time_in_ms);
1054 1054
1055 // Declare all the root indices. This defines the root list order. 1055 // Declare all the root indices. This defines the root list order.
1056 enum RootListIndex { 1056 enum RootListIndex {
1057 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 1057 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1058 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION) 1058 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION)
1059 #undef ROOT_INDEX_DECLARATION 1059 #undef ROOT_INDEX_DECLARATION
1060 1060
1061 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, 1061 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
1062 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION) 1062 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION)
1063 #undef STRING_DECLARATION 1063 #undef STRING_DECLARATION
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 // - a number less than 10 for small heaps, which are less than 8Mb. 1944 // - a number less than 10 for small heaps, which are less than 8Mb.
1945 // - a number greater than 10 for large heaps, which are greater than 32Mb. 1945 // - a number greater than 10 for large heaps, which are greater than 32Mb.
1946 int TimeMarkSweepWouldTakeInMs() { 1946 int TimeMarkSweepWouldTakeInMs() {
1947 // Rough estimate of how many megabytes of heap can be processed in 1 ms. 1947 // Rough estimate of how many megabytes of heap can be processed in 1 ms.
1948 static const int kMbPerMs = 2; 1948 static const int kMbPerMs = 2;
1949 1949
1950 int heap_size_mb = static_cast<int>(SizeOfObjects() / MB); 1950 int heap_size_mb = static_cast<int>(SizeOfObjects() / MB);
1951 return heap_size_mb / kMbPerMs; 1951 return heap_size_mb / kMbPerMs;
1952 } 1952 }
1953 1953
1954 void AdvanceIdleIncrementalMarking(intptr_t step_size); 1954 void AdvanceIdleIncrementalMarking(int idle_time_in_ms);
1955 1955
1956 void ClearObjectStats(bool clear_last_time_stats = false); 1956 void ClearObjectStats(bool clear_last_time_stats = false);
1957 1957
1958 void set_weak_object_to_code_table(Object* value) { 1958 void set_weak_object_to_code_table(Object* value) {
1959 DCHECK(!InNewSpace(value)); 1959 DCHECK(!InNewSpace(value));
1960 weak_object_to_code_table_ = value; 1960 weak_object_to_code_table_ = value;
1961 } 1961 }
1962 1962
1963 Object** weak_object_to_code_table_address() { 1963 Object** weak_object_to_code_table_address() {
1964 return &weak_object_to_code_table_; 1964 return &weak_object_to_code_table_;
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2520 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2521 2521
2522 private: 2522 private:
2523 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2523 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2524 }; 2524 };
2525 #endif // DEBUG 2525 #endif // DEBUG
2526 } 2526 }
2527 } // namespace v8::internal 2527 } // namespace v8::internal
2528 2528
2529 #endif // V8_HEAP_HEAP_H_ 2529 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698