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

Side by Side Diff: src/heap/object-stats.h

Issue 2410083003: Add over allocated memory of fixed array sub types to fixed array type. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_OBJECT_STATS_H_ 5 #ifndef V8_HEAP_OBJECT_STATS_H_
6 #define V8_HEAP_OBJECT_STATS_H_ 6 #define V8_HEAP_OBJECT_STATS_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 DCHECK(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); 68 DCHECK(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE);
69 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++; 69 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++;
70 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size; 70 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size;
71 size_histogram_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] 71 size_histogram_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]
72 [HistogramIndexFromSize(size)]++; 72 [HistogramIndexFromSize(size)]++;
73 if (over_allocated > 0) { 73 if (over_allocated > 0) {
74 over_allocated_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += 74 over_allocated_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] +=
75 over_allocated; 75 over_allocated;
76 over_allocated_histogram_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] 76 over_allocated_histogram_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]
77 [HistogramIndexFromSize(over_allocated)]++; 77 [HistogramIndexFromSize(over_allocated)]++;
78 over_allocated_[InstanceType::FIXED_ARRAY_TYPE] += over_allocated;
79 over_allocated_histogram_[InstanceType::FIXED_ARRAY_TYPE]
80 [HistogramIndexFromSize(over_allocated)]++;
78 } 81 }
79 return true; 82 return true;
80 } 83 }
81 84
82 size_t object_count_last_gc(size_t index) { 85 size_t object_count_last_gc(size_t index) {
83 return object_counts_last_time_[index]; 86 return object_counts_last_time_[index];
84 } 87 }
85 88
86 size_t object_size_last_gc(size_t index) { 89 size_t object_size_last_gc(size_t index) {
87 return object_sizes_last_time_[index]; 90 return object_sizes_last_time_[index];
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 Heap* heap_; 154 Heap* heap_;
152 ObjectStats* stats_; 155 ObjectStats* stats_;
153 156
154 friend class ObjectStatsCollector::CompilationCacheTableVisitor; 157 friend class ObjectStatsCollector::CompilationCacheTableVisitor;
155 }; 158 };
156 159
157 } // namespace internal 160 } // namespace internal
158 } // namespace v8 161 } // namespace v8
159 162
160 #endif // V8_HEAP_OBJECT_STATS_H_ 163 #endif // V8_HEAP_OBJECT_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698