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 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 enum ArrayStorageAllocationMode { | 342 enum ArrayStorageAllocationMode { |
343 DONT_INITIALIZE_ARRAY_ELEMENTS, | 343 DONT_INITIALIZE_ARRAY_ELEMENTS, |
344 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE | 344 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE |
345 }; | 345 }; |
346 | 346 |
347 enum class ClearRecordedSlots { kYes, kNo }; | 347 enum class ClearRecordedSlots { kYes, kNo }; |
348 | 348 |
349 enum class ClearBlackArea { kYes, kNo }; | 349 enum class ClearBlackArea { kYes, kNo }; |
350 | 350 |
351 enum class GarbageCollectionReason { | 351 enum class GarbageCollectionReason { |
352 kUnknown, | 352 kUnknown = 0, |
353 kAllocationFailure, | 353 kAllocationFailure = 1, |
354 kAllocationLimit, | 354 kAllocationLimit = 2, |
355 kContextDisposal, | 355 kContextDisposal = 3, |
356 kCountersExtension, | 356 kCountersExtension = 4, |
357 kDebugger, | 357 kDebugger = 5, |
358 kDeserializer, | 358 kDeserializer = 6, |
359 kExternalMemoryPressure, | 359 kExternalMemoryPressure = 7, |
360 kFinalizeMarkingViaStackGuard, | 360 kFinalizeMarkingViaStackGuard = 8, |
361 kFinalizeMarkingViaTask, | 361 kFinalizeMarkingViaTask = 9, |
362 kFullHashtable, | 362 kFullHashtable = 10, |
363 kHeapProfiler, | 363 kHeapProfiler = 11, |
364 kIdleTask, | 364 kIdleTask = 12, |
365 kLastResort, | 365 kLastResort = 13, |
366 kLowMemoryNotification, | 366 kLowMemoryNotification = 14, |
367 kMakeHeapIterable, | 367 kMakeHeapIterable = 15, |
368 kMemoryPressure, | 368 kMemoryPressure = 16, |
369 kMemoryReducer, | 369 kMemoryReducer = 17, |
370 kRuntime, | 370 kRuntime = 18, |
371 kSamplingProfiler, | 371 kSamplingProfiler = 19, |
372 kSnapshotCreator, | 372 kSnapshotCreator = 20, |
373 kTesting | 373 kTesting = 21 |
| 374 // If you add new items here, then update the incremental_marking_reason, |
| 375 // mark_compact_reason, and scavenge_reason counters in counters.h. |
| 376 // Also update src/tools/metrics/histograms/histograms.xml in chromium. |
374 }; | 377 }; |
375 | 378 |
376 // A queue of objects promoted during scavenge. Each object is accompanied by | 379 // A queue of objects promoted during scavenge. Each object is accompanied by |
377 // its size to avoid dereferencing a map pointer for scanning. The last page in | 380 // its size to avoid dereferencing a map pointer for scanning. The last page in |
378 // to-space is used for the promotion queue. On conflict during scavenge, the | 381 // to-space is used for the promotion queue. On conflict during scavenge, the |
379 // promotion queue is allocated externally and all entries are copied to the | 382 // promotion queue is allocated externally and all entries are copied to the |
380 // external queue. | 383 // external queue. |
381 class PromotionQueue { | 384 class PromotionQueue { |
382 public: | 385 public: |
383 explicit PromotionQueue(Heap* heap) | 386 explicit PromotionQueue(Heap* heap) |
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 friend class LargeObjectSpace; | 2638 friend class LargeObjectSpace; |
2636 friend class NewSpace; | 2639 friend class NewSpace; |
2637 friend class PagedSpace; | 2640 friend class PagedSpace; |
2638 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2641 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2639 }; | 2642 }; |
2640 | 2643 |
2641 } // namespace internal | 2644 } // namespace internal |
2642 } // namespace v8 | 2645 } // namespace v8 |
2643 | 2646 |
2644 #endif // V8_HEAP_HEAP_H_ | 2647 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |