OLD | NEW |
---|---|
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 |
11 #include "src/allocation.h" | 11 #include "src/allocation.h" |
12 #include "src/assert-scope.h" | 12 #include "src/assert-scope.h" |
13 #include "src/globals.h" | 13 #include "src/globals.h" |
14 #include "src/heap/gc-idle-time-handler.h" | 14 #include "src/heap/gc-idle-time-handler.h" |
15 #include "src/heap/gc-tracer.h" | |
16 #include "src/heap/incremental-marking.h" | 15 #include "src/heap/incremental-marking.h" |
17 #include "src/heap/mark-compact.h" | 16 #include "src/heap/mark-compact.h" |
18 #include "src/heap/memory-reducer.h" | 17 #include "src/heap/memory-reducer.h" |
19 #include "src/heap/objects-visiting.h" | 18 #include "src/heap/objects-visiting.h" |
20 #include "src/heap/spaces.h" | 19 #include "src/heap/spaces.h" |
21 #include "src/heap/store-buffer.h" | 20 #include "src/heap/store-buffer.h" |
22 #include "src/list.h" | 21 #include "src/list.h" |
23 | 22 |
24 namespace v8 { | 23 namespace v8 { |
25 namespace internal { | 24 namespace internal { |
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1337 void ProcessYoungWeakReferences(WeakObjectRetainer* retainer); | 1336 void ProcessYoungWeakReferences(WeakObjectRetainer* retainer); |
1338 | 1337 |
1339 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); | 1338 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); |
1340 | 1339 |
1341 // An object should be promoted if the object has survived a | 1340 // An object should be promoted if the object has survived a |
1342 // scavenge operation. | 1341 // scavenge operation. |
1343 inline bool ShouldBePromoted(Address old_address, int object_size); | 1342 inline bool ShouldBePromoted(Address old_address, int object_size); |
1344 | 1343 |
1345 void ClearNormalizedMapCaches(); | 1344 void ClearNormalizedMapCaches(); |
1346 | 1345 |
1347 GCTracer* tracer() { return &tracer_; } | 1346 GCTracer* tracer() { return tracer_; } |
Michael Lippautz
2015/08/20 15:09:07
Suggestion: GCTracer& ?
Michael Starzinger
2015/08/20 15:46:32
Acknowledged. As discussed offline, let's do this
| |
1348 | 1347 |
1349 // Returns the size of objects residing in non new spaces. | 1348 // Returns the size of objects residing in non new spaces. |
1350 intptr_t PromotedSpaceSizeOfObjects(); | 1349 intptr_t PromotedSpaceSizeOfObjects(); |
1351 | 1350 |
1352 double total_regexp_code_generated() { return total_regexp_code_generated_; } | 1351 double total_regexp_code_generated() { return total_regexp_code_generated_; } |
1353 void IncreaseTotalRegexpCodeGenerated(int size) { | 1352 void IncreaseTotalRegexpCodeGenerated(int size) { |
1354 total_regexp_code_generated_ += size; | 1353 total_regexp_code_generated_ += size; |
1355 } | 1354 } |
1356 | 1355 |
1357 void IncrementCodeGeneratedBytes(bool is_crankshafted, int size) { | 1356 void IncrementCodeGeneratedBytes(bool is_crankshafted, int size) { |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2090 | 2089 |
2091 // Record statistics before and after garbage collection. | 2090 // Record statistics before and after garbage collection. |
2092 void ReportStatisticsBeforeGC(); | 2091 void ReportStatisticsBeforeGC(); |
2093 void ReportStatisticsAfterGC(); | 2092 void ReportStatisticsAfterGC(); |
2094 | 2093 |
2095 // Total RegExp code ever generated | 2094 // Total RegExp code ever generated |
2096 double total_regexp_code_generated_; | 2095 double total_regexp_code_generated_; |
2097 | 2096 |
2098 int deferred_counters_[v8::Isolate::kUseCounterFeatureCount]; | 2097 int deferred_counters_[v8::Isolate::kUseCounterFeatureCount]; |
2099 | 2098 |
2100 GCTracer tracer_; | 2099 GCTracer* tracer_; |
2101 | 2100 |
2102 // Creates and installs the full-sized number string cache. | 2101 // Creates and installs the full-sized number string cache. |
2103 int FullSizeNumberStringCacheLength(); | 2102 int FullSizeNumberStringCacheLength(); |
2104 // Flush the number to string cache. | 2103 // Flush the number to string cache. |
2105 void FlushNumberStringCache(); | 2104 void FlushNumberStringCache(); |
2106 | 2105 |
2107 // Sets used allocation sites entries to undefined. | 2106 // Sets used allocation sites entries to undefined. |
2108 void FlushAllocationSitesScratchpad(); | 2107 void FlushAllocationSitesScratchpad(); |
2109 | 2108 |
2110 // Initializes the allocation sites scratchpad with undefined values. | 2109 // Initializes the allocation sites scratchpad with undefined values. |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2696 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2695 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2697 | 2696 |
2698 private: | 2697 private: |
2699 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2698 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2700 }; | 2699 }; |
2701 #endif // DEBUG | 2700 #endif // DEBUG |
2702 } | 2701 } |
2703 } // namespace v8::internal | 2702 } // namespace v8::internal |
2704 | 2703 |
2705 #endif // V8_HEAP_HEAP_H_ | 2704 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |