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

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

Issue 1094613002: Add a flag to trace heap object stats on GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/flag-definitions.h ('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 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698