Chromium Code Reviews| 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_COUNTERS_H_ | 5 #ifndef V8_COUNTERS_H_ |
| 6 #define V8_COUNTERS_H_ | 6 #define V8_COUNTERS_H_ |
| 7 | 7 |
| 8 #include "include/v8.h" | 8 #include "include/v8.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/base/atomic-utils.h" | 10 #include "src/base/atomic-utils.h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 namespace v8 { | 21 namespace v8 { |
| 22 namespace internal { | 22 namespace internal { |
| 23 | 23 |
| 24 // StatsCounters is an interface for plugging into external | 24 // StatsCounters is an interface for plugging into external |
| 25 // counters for monitoring. Counters can be looked up and | 25 // counters for monitoring. Counters can be looked up and |
| 26 // manipulated by name. | 26 // manipulated by name. |
| 27 | 27 |
| 28 class StatsTable { | 28 class StatsTable { |
| 29 public: | 29 public: |
| 30 // Register an application-defined function where | 30 // Register an application-defined function where |
| 31 // counters can be looked up. | 31 // counters can be looked up. Note: Must be called on main thread, |
| 32 void SetCounterFunction(CounterLookupCallback f) { | 32 // so that threaded stats counters can be created now. |
| 33 lookup_function_ = f; | 33 void SetCounterFunction(CounterLookupCallback f, Isolate* isolate); |
| 34 } | |
| 35 | 34 |
| 36 // Register an application-defined function to create | 35 // Register an application-defined function to create |
| 37 // a histogram for passing to the AddHistogramSample function | 36 // a histogram for passing to the AddHistogramSample function |
| 38 void SetCreateHistogramFunction(CreateHistogramCallback f) { | 37 void SetCreateHistogramFunction(CreateHistogramCallback f) { |
| 39 create_histogram_function_ = f; | 38 create_histogram_function_ = f; |
| 40 } | 39 } |
| 41 | 40 |
| 42 // Register an application-defined function to add a sample | 41 // Register an application-defined function to add a sample |
| 43 // to a histogram created with CreateHistogram function | 42 // to a histogram created with CreateHistogram function |
| 44 void SetAddHistogramSampleFunction(AddHistogramSampleCallback f) { | 43 void SetAddHistogramSampleFunction(AddHistogramSampleCallback f) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 // The row has a 32bit value for each process/thread in the table and also | 99 // The row has a 32bit value for each process/thread in the table and also |
| 101 // a name (stored in the table metadata). Since the storage location can be | 100 // a name (stored in the table metadata). Since the storage location can be |
| 102 // thread-specific, this class cannot be shared across threads. | 101 // thread-specific, this class cannot be shared across threads. |
| 103 class StatsCounter { | 102 class StatsCounter { |
| 104 public: | 103 public: |
| 105 StatsCounter() { } | 104 StatsCounter() { } |
| 106 explicit StatsCounter(Isolate* isolate, const char* name) | 105 explicit StatsCounter(Isolate* isolate, const char* name) |
| 107 : isolate_(isolate), name_(name), ptr_(NULL), lookup_done_(false) { } | 106 : isolate_(isolate), name_(name), ptr_(NULL), lookup_done_(false) { } |
| 108 | 107 |
| 109 // Sets the counter to a specific value. | 108 // Sets the counter to a specific value. |
| 110 void Set(int value) { | 109 void Set(int value) { Set(GetPtr(), value); } |
|
jochen (gone - plz use gerrit)
2017/05/23 11:29:20
having that all public looks odd. Could the thread
kschimpf
2017/05/23 16:53:07
I don't understand this comment. The thread safe v
| |
| 111 int* loc = GetPtr(); | |
| 112 if (loc) *loc = value; | |
| 113 } | |
| 114 | 110 |
| 115 // Increments the counter. | 111 // Increments the counter. |
| 116 void Increment() { | 112 void Increment() { Increment(GetPtr()); } |
| 117 int* loc = GetPtr(); | |
| 118 if (loc) (*loc)++; | |
| 119 } | |
| 120 | 113 |
| 121 void Increment(int value) { | 114 void Increment(int value) { Increment(GetPtr(), value); } |
| 122 int* loc = GetPtr(); | |
| 123 if (loc) | |
| 124 (*loc) += value; | |
| 125 } | |
| 126 | 115 |
| 127 // Decrements the counter. | 116 // Decrements the counter. |
| 128 void Decrement() { | 117 void Decrement() { Decrement(GetPtr()); } |
| 129 int* loc = GetPtr(); | |
| 130 if (loc) (*loc)--; | |
| 131 } | |
| 132 | 118 |
| 133 void Decrement(int value) { | 119 void Decrement(int value) { Decrement(GetPtr(), value); } |
| 134 int* loc = GetPtr(); | |
| 135 if (loc) (*loc) -= value; | |
| 136 } | |
| 137 | 120 |
| 138 // Is this counter enabled? | 121 // Is this counter enabled? |
| 139 // Returns false if table is full. | 122 // Returns false if table is full. |
| 140 bool Enabled() { | 123 bool Enabled() { |
| 141 return GetPtr() != NULL; | 124 return GetPtr() != NULL; |
| 142 } | 125 } |
| 143 | 126 |
| 144 // Get the internal pointer to the counter. This is used | 127 // Get the internal pointer to the counter. This is used |
| 145 // by the code generator to emit code that manipulates a | 128 // by the code generator to emit code that manipulates a |
| 146 // given counter without calling the runtime system. | 129 // given counter without calling the runtime system. |
| 147 int* GetInternalPointer() { | 130 int* GetInternalPointer() { |
| 148 int* loc = GetPtr(); | 131 int* loc = GetPtr(); |
| 149 DCHECK(loc != NULL); | 132 DCHECK(loc != NULL); |
| 150 return loc; | 133 return loc; |
| 151 } | 134 } |
| 152 | 135 |
| 153 // Reset the cached internal pointer. | 136 // Reset the cached internal pointer. |
| 154 void Reset() { lookup_done_ = false; } | 137 void Reset() { lookup_done_ = false; } |
| 155 | 138 |
| 156 protected: | 139 protected: |
| 157 // Returns the cached address of this counter location. | 140 // Returns the cached address of this counter location. |
| 158 int* GetPtr() { | 141 int* GetPtr() { |
| 159 if (lookup_done_) return ptr_; | 142 if (lookup_done_) return ptr_; |
| 160 lookup_done_ = true; | 143 lookup_done_ = true; |
| 161 ptr_ = FindLocationInStatsTable(); | 144 ptr_ = FindLocationInStatsTable(); |
| 162 return ptr_; | 145 return ptr_; |
| 163 } | 146 } |
| 164 | 147 |
| 165 private: | |
| 166 int* FindLocationInStatsTable() const; | 148 int* FindLocationInStatsTable() const; |
| 167 | 149 |
| 150 void Set(int* loc, int value) { | |
| 151 if (loc) *loc = value; | |
| 152 } | |
| 153 | |
| 154 void Increment(int* loc) { | |
| 155 if (loc) (*loc)++; | |
| 156 } | |
| 157 | |
| 158 void Increment(int* loc, int value) { | |
| 159 if (loc) (*loc) += value; | |
| 160 } | |
| 161 | |
| 162 void Decrement(int* loc) { | |
| 163 if (loc) (*loc)--; | |
| 164 } | |
| 165 | |
| 166 void Decrement(int* loc, int value) { | |
| 167 if (loc) (*loc) -= value; | |
| 168 } | |
| 169 | |
| 168 Isolate* isolate_; | 170 Isolate* isolate_; |
| 169 const char* name_; | 171 const char* name_; |
| 170 int* ptr_; | 172 int* ptr_; |
| 171 bool lookup_done_; | 173 bool lookup_done_; |
| 172 }; | 174 }; |
| 173 | 175 |
| 176 // Thread safe version of StatsCounter. WARNING: Unlike StatsCounter, | |
| 177 // StatsCounterThreadSafe's constructor and method Reset() actually do | |
| 178 // the table lookup, and should be called from the main thread | |
| 179 // (i.e. not workers). | |
| 180 class StatsCounterThreadSafe : public StatsCounter { | |
| 181 public: | |
| 182 explicit StatsCounterThreadSafe(Isolate* isolate, const char* name); | |
|
jochen (gone - plz use gerrit)
2017/05/23 11:29:21
nit. no explicit
kschimpf
2017/05/23 16:53:07
Done.
| |
| 183 | |
| 184 void Set(int Value); | |
| 185 void Increment(); | |
| 186 void Increment(int value); | |
| 187 void Decrement(); | |
| 188 void Decrement(int value); | |
| 189 bool Enabled() { return ptr_ != NULL; } | |
| 190 int* GetInternalPointer() { | |
| 191 DCHECK(ptr_ != NULL); | |
| 192 return ptr_; | |
| 193 } | |
| 194 void Reset(); | |
| 195 | |
| 196 private: | |
| 197 int* GetPtr(); | |
| 198 | |
| 199 base::Mutex mutex_; | |
| 200 | |
| 201 private: | |
| 202 DISALLOW_IMPLICIT_CONSTRUCTORS(StatsCounterThreadSafe); | |
| 203 }; | |
| 204 | |
| 174 // A Histogram represents a dynamically created histogram in the StatsTable. | 205 // A Histogram represents a dynamically created histogram in the StatsTable. |
| 175 // It will be registered with the histogram system on first use. | 206 // It will be registered with the histogram system on first use. |
| 176 class Histogram { | 207 class Histogram { |
| 177 public: | 208 public: |
| 178 Histogram() { } | 209 Histogram() { } |
| 179 Histogram(const char* name, | 210 Histogram(const char* name, |
| 180 int min, | 211 int min, |
| 181 int max, | 212 int max, |
| 182 int num_buckets, | 213 int num_buckets, |
| 183 Isolate* isolate) | 214 Isolate* isolate) |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1160 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ | 1191 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ |
| 1161 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ | 1192 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ |
| 1162 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ | 1193 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ |
| 1163 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ | 1194 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ |
| 1164 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ | 1195 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ |
| 1165 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ | 1196 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ |
| 1166 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) \ | 1197 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) \ |
| 1167 /* Total code size (including metadata) of baseline code or bytecode. */ \ | 1198 /* Total code size (including metadata) of baseline code or bytecode. */ \ |
| 1168 SC(total_baseline_code_size, V8.TotalBaselineCodeSize) \ | 1199 SC(total_baseline_code_size, V8.TotalBaselineCodeSize) \ |
| 1169 /* Total count of functions compiled using the baseline compiler. */ \ | 1200 /* Total count of functions compiled using the baseline compiler. */ \ |
| 1170 SC(total_baseline_compile_count, V8.TotalBaselineCompileCount) \ | 1201 SC(total_baseline_compile_count, V8.TotalBaselineCompileCount) |
| 1171 SC(wasm_generated_code_size, V8.WasmGeneratedCodeBytes) \ | 1202 |
| 1172 SC(wasm_reloc_size, V8.WasmRelocBytes) \ | 1203 #define STATS_COUNTER_TS_LIST(SC) \ |
| 1204 SC(wasm_generated_code_size, V8.WasmGeneratedCodeBytes) \ | |
| 1205 SC(wasm_reloc_size, V8.WasmRelocBytes) \ | |
| 1173 SC(wasm_lazily_compiled_functions, V8.WasmLazilyCompiledFunctions) | 1206 SC(wasm_lazily_compiled_functions, V8.WasmLazilyCompiledFunctions) |
| 1174 | 1207 |
| 1175 // This file contains all the v8 counters that are in use. | 1208 // This file contains all the v8 counters that are in use. |
| 1176 class Counters { | 1209 class Counters : public std::enable_shared_from_this<Counters> { |
| 1177 public: | 1210 public: |
| 1211 explicit Counters(Isolate* isolate); | |
| 1212 | |
| 1178 #define HR(name, caption, min, max, num_buckets) \ | 1213 #define HR(name, caption, min, max, num_buckets) \ |
| 1179 Histogram* name() { return &name##_; } | 1214 Histogram* name() { return &name##_; } |
| 1180 HISTOGRAM_RANGE_LIST(HR) | 1215 HISTOGRAM_RANGE_LIST(HR) |
| 1181 #undef HR | 1216 #undef HR |
| 1182 | 1217 |
| 1183 #define HT(name, caption, max, res) \ | 1218 #define HT(name, caption, max, res) \ |
| 1184 HistogramTimer* name() { return &name##_; } | 1219 HistogramTimer* name() { return &name##_; } |
| 1185 HISTOGRAM_TIMER_LIST(HT) | 1220 HISTOGRAM_TIMER_LIST(HT) |
| 1186 #undef HT | 1221 #undef HT |
| 1187 | 1222 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 1207 } | 1242 } |
| 1208 HISTOGRAM_MEMORY_LIST(HM) | 1243 HISTOGRAM_MEMORY_LIST(HM) |
| 1209 #undef HM | 1244 #undef HM |
| 1210 | 1245 |
| 1211 #define SC(name, caption) \ | 1246 #define SC(name, caption) \ |
| 1212 StatsCounter* name() { return &name##_; } | 1247 StatsCounter* name() { return &name##_; } |
| 1213 STATS_COUNTER_LIST_1(SC) | 1248 STATS_COUNTER_LIST_1(SC) |
| 1214 STATS_COUNTER_LIST_2(SC) | 1249 STATS_COUNTER_LIST_2(SC) |
| 1215 #undef SC | 1250 #undef SC |
| 1216 | 1251 |
| 1252 #define SC(name, caption) \ | |
| 1253 StatsCounterThreadSafe* name() { return &name##_; } | |
| 1254 STATS_COUNTER_TS_LIST(SC) | |
| 1255 #undef SC | |
| 1256 | |
| 1217 #define SC(name) \ | 1257 #define SC(name) \ |
| 1218 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ | 1258 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ |
| 1219 StatsCounter* size_of_##name() { return &size_of_##name##_; } | 1259 StatsCounter* size_of_##name() { return &size_of_##name##_; } |
| 1220 INSTANCE_TYPE_LIST(SC) | 1260 INSTANCE_TYPE_LIST(SC) |
| 1221 #undef SC | 1261 #undef SC |
| 1222 | 1262 |
| 1223 #define SC(name) \ | 1263 #define SC(name) \ |
| 1224 StatsCounter* count_of_CODE_TYPE_##name() \ | 1264 StatsCounter* count_of_CODE_TYPE_##name() \ |
| 1225 { return &count_of_CODE_TYPE_##name##_; } \ | 1265 { return &count_of_CODE_TYPE_##name##_; } \ |
| 1226 StatsCounter* size_of_CODE_TYPE_##name() \ | 1266 StatsCounter* size_of_CODE_TYPE_##name() \ |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 1237 #undef SC | 1277 #undef SC |
| 1238 | 1278 |
| 1239 #define SC(name) \ | 1279 #define SC(name) \ |
| 1240 StatsCounter* count_of_CODE_AGE_##name() \ | 1280 StatsCounter* count_of_CODE_AGE_##name() \ |
| 1241 { return &count_of_CODE_AGE_##name##_; } \ | 1281 { return &count_of_CODE_AGE_##name##_; } \ |
| 1242 StatsCounter* size_of_CODE_AGE_##name() \ | 1282 StatsCounter* size_of_CODE_AGE_##name() \ |
| 1243 { return &size_of_CODE_AGE_##name##_; } | 1283 { return &size_of_CODE_AGE_##name##_; } |
| 1244 CODE_AGE_LIST_COMPLETE(SC) | 1284 CODE_AGE_LIST_COMPLETE(SC) |
| 1245 #undef SC | 1285 #undef SC |
| 1246 | 1286 |
| 1287 // clang-format off | |
|
jochen (gone - plz use gerrit)
2017/05/23 11:29:20
hum, why?
kschimpf
2017/05/23 16:53:07
Because clang-format changes the following Defines
| |
| 1247 enum Id { | 1288 enum Id { |
| 1248 #define RATE_ID(name, caption, max, res) k_##name, | 1289 #define RATE_ID(name, caption, max, res) k_##name, |
| 1249 HISTOGRAM_TIMER_LIST(RATE_ID) | 1290 HISTOGRAM_TIMER_LIST(RATE_ID) |
| 1250 #undef RATE_ID | 1291 #undef RATE_ID |
| 1251 #define AGGREGATABLE_ID(name, caption) k_##name, | 1292 #define AGGREGATABLE_ID(name, caption) k_##name, |
| 1252 AGGREGATABLE_HISTOGRAM_TIMER_LIST(AGGREGATABLE_ID) | 1293 AGGREGATABLE_HISTOGRAM_TIMER_LIST(AGGREGATABLE_ID) |
| 1253 #undef AGGREGATABLE_ID | 1294 #undef AGGREGATABLE_ID |
| 1254 #define PERCENTAGE_ID(name, caption) k_##name, | 1295 #define PERCENTAGE_ID(name, caption) k_##name, |
| 1255 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) | 1296 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) |
| 1256 #undef PERCENTAGE_ID | 1297 #undef PERCENTAGE_ID |
| 1257 #define MEMORY_ID(name, caption) k_##name, | 1298 #define MEMORY_ID(name, caption) k_##name, |
| 1258 HISTOGRAM_LEGACY_MEMORY_LIST(MEMORY_ID) | 1299 HISTOGRAM_LEGACY_MEMORY_LIST(MEMORY_ID) |
| 1259 HISTOGRAM_MEMORY_LIST(MEMORY_ID) | 1300 HISTOGRAM_MEMORY_LIST(MEMORY_ID) |
| 1260 #undef MEMORY_ID | 1301 #undef MEMORY_ID |
| 1261 #define COUNTER_ID(name, caption) k_##name, | 1302 #define COUNTER_ID(name, caption) k_##name, |
| 1262 STATS_COUNTER_LIST_1(COUNTER_ID) | 1303 STATS_COUNTER_LIST_1(COUNTER_ID) |
| 1263 STATS_COUNTER_LIST_2(COUNTER_ID) | 1304 STATS_COUNTER_LIST_2(COUNTER_ID) |
| 1305 STATS_COUNTER_TS_LIST(COUNTER_ID) | |
| 1264 #undef COUNTER_ID | 1306 #undef COUNTER_ID |
| 1265 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, | 1307 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, |
| 1266 INSTANCE_TYPE_LIST(COUNTER_ID) | 1308 INSTANCE_TYPE_LIST(COUNTER_ID) |
| 1267 #undef COUNTER_ID | 1309 #undef COUNTER_ID |
| 1268 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ | 1310 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ |
| 1269 kSizeOfCODE_TYPE_##name, | 1311 kSizeOfCODE_TYPE_##name, |
| 1270 CODE_KIND_LIST(COUNTER_ID) | 1312 CODE_KIND_LIST(COUNTER_ID) |
| 1271 #undef COUNTER_ID | 1313 #undef COUNTER_ID |
| 1272 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \ | 1314 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \ |
| 1273 kSizeOfFIXED_ARRAY__##name, | 1315 kSizeOfFIXED_ARRAY__##name, |
| 1274 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID) | 1316 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID) |
| 1275 #undef COUNTER_ID | 1317 #undef COUNTER_ID |
| 1276 #define COUNTER_ID(name) kCountOfCODE_AGE__##name, \ | 1318 #define COUNTER_ID(name) kCountOfCODE_AGE__##name, \ |
| 1277 kSizeOfCODE_AGE__##name, | 1319 kSizeOfCODE_AGE__##name, |
| 1278 CODE_AGE_LIST_COMPLETE(COUNTER_ID) | 1320 CODE_AGE_LIST_COMPLETE(COUNTER_ID) |
| 1279 #undef COUNTER_ID | 1321 #undef COUNTER_ID |
| 1280 stats_counter_count | 1322 stats_counter_count |
| 1281 }; | 1323 }; |
| 1324 // clang-format on | |
| 1282 | 1325 |
| 1283 void ResetCounters(); | 1326 void ResetCounters(); |
| 1284 void ResetHistograms(); | 1327 void ResetHistograms(); |
| 1285 void InitializeHistograms(); | 1328 void InitializeHistograms(); |
| 1286 | 1329 |
| 1287 RuntimeCallStats* runtime_call_stats() { return &runtime_call_stats_; } | 1330 RuntimeCallStats* runtime_call_stats() { return &runtime_call_stats_; } |
| 1288 | 1331 |
| 1289 private: | 1332 private: |
| 1290 #define HR(name, caption, min, max, num_buckets) Histogram name##_; | 1333 #define HR(name, caption, min, max, num_buckets) Histogram name##_; |
| 1291 HISTOGRAM_RANGE_LIST(HR) | 1334 HISTOGRAM_RANGE_LIST(HR) |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 1315 AggregatedMemoryHistogram<Histogram> aggregated_##name##_; | 1358 AggregatedMemoryHistogram<Histogram> aggregated_##name##_; |
| 1316 HISTOGRAM_MEMORY_LIST(HM) | 1359 HISTOGRAM_MEMORY_LIST(HM) |
| 1317 #undef HM | 1360 #undef HM |
| 1318 | 1361 |
| 1319 #define SC(name, caption) \ | 1362 #define SC(name, caption) \ |
| 1320 StatsCounter name##_; | 1363 StatsCounter name##_; |
| 1321 STATS_COUNTER_LIST_1(SC) | 1364 STATS_COUNTER_LIST_1(SC) |
| 1322 STATS_COUNTER_LIST_2(SC) | 1365 STATS_COUNTER_LIST_2(SC) |
| 1323 #undef SC | 1366 #undef SC |
| 1324 | 1367 |
| 1368 #define SC(name, caption) StatsCounterThreadSafe name##_; | |
| 1369 STATS_COUNTER_TS_LIST(SC) | |
| 1370 #undef SC | |
| 1371 | |
| 1325 #define SC(name) \ | 1372 #define SC(name) \ |
| 1326 StatsCounter size_of_##name##_; \ | 1373 StatsCounter size_of_##name##_; \ |
| 1327 StatsCounter count_of_##name##_; | 1374 StatsCounter count_of_##name##_; |
| 1328 INSTANCE_TYPE_LIST(SC) | 1375 INSTANCE_TYPE_LIST(SC) |
| 1329 #undef SC | 1376 #undef SC |
| 1330 | 1377 |
| 1331 #define SC(name) \ | 1378 #define SC(name) \ |
| 1332 StatsCounter size_of_CODE_TYPE_##name##_; \ | 1379 StatsCounter size_of_CODE_TYPE_##name##_; \ |
| 1333 StatsCounter count_of_CODE_TYPE_##name##_; | 1380 StatsCounter count_of_CODE_TYPE_##name##_; |
| 1334 CODE_KIND_LIST(SC) | 1381 CODE_KIND_LIST(SC) |
| 1335 #undef SC | 1382 #undef SC |
| 1336 | 1383 |
| 1337 #define SC(name) \ | 1384 #define SC(name) \ |
| 1338 StatsCounter size_of_FIXED_ARRAY_##name##_; \ | 1385 StatsCounter size_of_FIXED_ARRAY_##name##_; \ |
| 1339 StatsCounter count_of_FIXED_ARRAY_##name##_; | 1386 StatsCounter count_of_FIXED_ARRAY_##name##_; |
| 1340 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 1387 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
| 1341 #undef SC | 1388 #undef SC |
| 1342 | 1389 |
| 1343 #define SC(name) \ | 1390 #define SC(name) \ |
| 1344 StatsCounter size_of_CODE_AGE_##name##_; \ | 1391 StatsCounter size_of_CODE_AGE_##name##_; \ |
| 1345 StatsCounter count_of_CODE_AGE_##name##_; | 1392 StatsCounter count_of_CODE_AGE_##name##_; |
| 1346 CODE_AGE_LIST_COMPLETE(SC) | 1393 CODE_AGE_LIST_COMPLETE(SC) |
| 1347 #undef SC | 1394 #undef SC |
| 1348 | 1395 |
| 1349 RuntimeCallStats runtime_call_stats_; | 1396 RuntimeCallStats runtime_call_stats_; |
| 1350 | 1397 |
| 1351 friend class Isolate; | 1398 friend class Isolate; |
| 1352 | 1399 |
| 1353 explicit Counters(Isolate* isolate); | |
| 1354 | |
| 1355 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 1400 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
| 1356 }; | 1401 }; |
| 1357 | 1402 |
| 1358 } // namespace internal | 1403 } // namespace internal |
| 1359 } // namespace v8 | 1404 } // namespace v8 |
| 1360 | 1405 |
| 1361 #endif // V8_COUNTERS_H_ | 1406 #endif // V8_COUNTERS_H_ |
| OLD | NEW |