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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 object_counts_[code_age_index]++; | 1422 object_counts_[code_age_index]++; |
1423 object_sizes_[code_age_index] += size; | 1423 object_sizes_[code_age_index] += size; |
1424 } | 1424 } |
1425 | 1425 |
1426 void RecordFixedArraySubTypeStats(int array_sub_type, size_t size) { | 1426 void RecordFixedArraySubTypeStats(int array_sub_type, size_t size) { |
1427 DCHECK(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); | 1427 DCHECK(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); |
1428 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++; | 1428 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++; |
1429 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size; | 1429 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size; |
1430 } | 1430 } |
1431 | 1431 |
| 1432 void TraceObjectStats(); |
1432 void CheckpointObjectStats(); | 1433 void CheckpointObjectStats(); |
1433 | 1434 |
1434 // We don't use a LockGuard here since we want to lock the heap | 1435 // We don't use a LockGuard here since we want to lock the heap |
1435 // only when FLAG_concurrent_recompilation is true. | 1436 // only when FLAG_concurrent_recompilation is true. |
1436 class RelocationLock { | 1437 class RelocationLock { |
1437 public: | 1438 public: |
1438 explicit RelocationLock(Heap* heap) : heap_(heap) { | 1439 explicit RelocationLock(Heap* heap) : heap_(heap) { |
1439 heap_->relocation_mutex_.Lock(); | 1440 heap_->relocation_mutex_.Lock(); |
1440 } | 1441 } |
1441 | 1442 |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2608 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2609 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2609 | 2610 |
2610 private: | 2611 private: |
2611 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2612 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2612 }; | 2613 }; |
2613 #endif // DEBUG | 2614 #endif // DEBUG |
2614 } | 2615 } |
2615 } // namespace v8::internal | 2616 } // namespace v8::internal |
2616 | 2617 |
2617 #endif // V8_HEAP_HEAP_H_ | 2618 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |