OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 V8.MemoryExternalFragmentationOldPointerSpace) \ | 58 V8.MemoryExternalFragmentationOldPointerSpace) \ |
59 HP(external_fragmentation_old_data_space, \ | 59 HP(external_fragmentation_old_data_space, \ |
60 V8.MemoryExternalFragmentationOldDataSpace) \ | 60 V8.MemoryExternalFragmentationOldDataSpace) \ |
61 HP(external_fragmentation_code_space, \ | 61 HP(external_fragmentation_code_space, \ |
62 V8.MemoryExternalFragmentationCodeSpace) \ | 62 V8.MemoryExternalFragmentationCodeSpace) \ |
63 HP(external_fragmentation_map_space, \ | 63 HP(external_fragmentation_map_space, \ |
64 V8.MemoryExternalFragmentationMapSpace) \ | 64 V8.MemoryExternalFragmentationMapSpace) \ |
65 HP(external_fragmentation_cell_space, \ | 65 HP(external_fragmentation_cell_space, \ |
66 V8.MemoryExternalFragmentationCellSpace) \ | 66 V8.MemoryExternalFragmentationCellSpace) \ |
67 HP(external_fragmentation_lo_space, \ | 67 HP(external_fragmentation_lo_space, \ |
68 V8.MemoryExternalFragmentationLoSpace) | 68 V8.MemoryExternalFragmentationLoSpace) \ |
| 69 HP(heap_fraction_map_space, \ |
| 70 V8.MemoryHeapFractionMapSpace) \ |
| 71 HP(heap_fraction_cell_space, \ |
| 72 V8.MemoryHeapFractionCellSpace) \ |
| 73 |
| 74 |
| 75 #define HISTOGRAM_MEMORY_LIST(HM) \ |
| 76 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ |
| 77 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ |
| 78 HM(heap_sample_map_space_committed, \ |
| 79 V8.MemoryHeapSampleMapSpaceCommitted) \ |
| 80 HM(heap_sample_cell_space_committed, \ |
| 81 V8.MemoryHeapSampleCellSpaceCommitted) |
69 | 82 |
70 | 83 |
71 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 84 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
72 // Intellisense to crash. It was broken into two macros (each of length 40 | 85 // Intellisense to crash. It was broken into two macros (each of length 40 |
73 // lines) rather than one macro (of length about 80 lines) to work around | 86 // lines) rather than one macro (of length about 80 lines) to work around |
74 // this problem. Please avoid using recursive macros of this length when | 87 // this problem. Please avoid using recursive macros of this length when |
75 // possible. | 88 // possible. |
76 #define STATS_COUNTER_LIST_1(SC) \ | 89 #define STATS_COUNTER_LIST_1(SC) \ |
77 /* Global Handle Count*/ \ | 90 /* Global Handle Count*/ \ |
78 SC(global_handles, V8.GlobalHandles) \ | 91 SC(global_handles, V8.GlobalHandles) \ |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 #define HT(name, caption) \ | 309 #define HT(name, caption) \ |
297 HistogramTimer* name() { return &name##_; } | 310 HistogramTimer* name() { return &name##_; } |
298 HISTOGRAM_TIMER_LIST(HT) | 311 HISTOGRAM_TIMER_LIST(HT) |
299 #undef HT | 312 #undef HT |
300 | 313 |
301 #define HP(name, caption) \ | 314 #define HP(name, caption) \ |
302 Histogram* name() { return &name##_; } | 315 Histogram* name() { return &name##_; } |
303 HISTOGRAM_PERCENTAGE_LIST(HP) | 316 HISTOGRAM_PERCENTAGE_LIST(HP) |
304 #undef HP | 317 #undef HP |
305 | 318 |
| 319 #define HM(name, caption) \ |
| 320 Histogram* name() { return &name##_; } |
| 321 HISTOGRAM_MEMORY_LIST(HM) |
| 322 #undef HM |
| 323 |
306 #define SC(name, caption) \ | 324 #define SC(name, caption) \ |
307 StatsCounter* name() { return &name##_; } | 325 StatsCounter* name() { return &name##_; } |
308 STATS_COUNTER_LIST_1(SC) | 326 STATS_COUNTER_LIST_1(SC) |
309 STATS_COUNTER_LIST_2(SC) | 327 STATS_COUNTER_LIST_2(SC) |
310 #undef SC | 328 #undef SC |
311 | 329 |
312 #define SC(name) \ | 330 #define SC(name) \ |
313 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ | 331 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ |
314 StatsCounter* size_of_##name() { return &size_of_##name##_; } | 332 StatsCounter* size_of_##name() { return &size_of_##name##_; } |
315 INSTANCE_TYPE_LIST(SC) | 333 INSTANCE_TYPE_LIST(SC) |
(...skipping 15 matching lines...) Expand all Loading... |
331 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 349 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
332 #undef SC | 350 #undef SC |
333 | 351 |
334 enum Id { | 352 enum Id { |
335 #define RATE_ID(name, caption) k_##name, | 353 #define RATE_ID(name, caption) k_##name, |
336 HISTOGRAM_TIMER_LIST(RATE_ID) | 354 HISTOGRAM_TIMER_LIST(RATE_ID) |
337 #undef RATE_ID | 355 #undef RATE_ID |
338 #define PERCENTAGE_ID(name, caption) k_##name, | 356 #define PERCENTAGE_ID(name, caption) k_##name, |
339 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) | 357 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) |
340 #undef PERCENTAGE_ID | 358 #undef PERCENTAGE_ID |
| 359 #define MEMORY_ID(name, caption) k_##name, |
| 360 HISTOGRAM_MEMORY_LIST(MEMORY_ID) |
| 361 #undef MEMORY_ID |
341 #define COUNTER_ID(name, caption) k_##name, | 362 #define COUNTER_ID(name, caption) k_##name, |
342 STATS_COUNTER_LIST_1(COUNTER_ID) | 363 STATS_COUNTER_LIST_1(COUNTER_ID) |
343 STATS_COUNTER_LIST_2(COUNTER_ID) | 364 STATS_COUNTER_LIST_2(COUNTER_ID) |
344 #undef COUNTER_ID | 365 #undef COUNTER_ID |
345 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, | 366 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, |
346 INSTANCE_TYPE_LIST(COUNTER_ID) | 367 INSTANCE_TYPE_LIST(COUNTER_ID) |
347 #undef COUNTER_ID | 368 #undef COUNTER_ID |
348 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ | 369 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ |
349 kSizeOfCODE_TYPE_##name, | 370 kSizeOfCODE_TYPE_##name, |
350 CODE_KIND_LIST(COUNTER_ID) | 371 CODE_KIND_LIST(COUNTER_ID) |
(...skipping 18 matching lines...) Expand all Loading... |
369 #define HT(name, caption) \ | 390 #define HT(name, caption) \ |
370 HistogramTimer name##_; | 391 HistogramTimer name##_; |
371 HISTOGRAM_TIMER_LIST(HT) | 392 HISTOGRAM_TIMER_LIST(HT) |
372 #undef HT | 393 #undef HT |
373 | 394 |
374 #define HP(name, caption) \ | 395 #define HP(name, caption) \ |
375 Histogram name##_; | 396 Histogram name##_; |
376 HISTOGRAM_PERCENTAGE_LIST(HP) | 397 HISTOGRAM_PERCENTAGE_LIST(HP) |
377 #undef HP | 398 #undef HP |
378 | 399 |
| 400 #define HM(name, caption) \ |
| 401 Histogram name##_; |
| 402 HISTOGRAM_MEMORY_LIST(HM) |
| 403 #undef HM |
| 404 |
379 #define SC(name, caption) \ | 405 #define SC(name, caption) \ |
380 StatsCounter name##_; | 406 StatsCounter name##_; |
381 STATS_COUNTER_LIST_1(SC) | 407 STATS_COUNTER_LIST_1(SC) |
382 STATS_COUNTER_LIST_2(SC) | 408 STATS_COUNTER_LIST_2(SC) |
383 #undef SC | 409 #undef SC |
384 | 410 |
385 #define SC(name) \ | 411 #define SC(name) \ |
386 StatsCounter size_of_##name##_; \ | 412 StatsCounter size_of_##name##_; \ |
387 StatsCounter count_of_##name##_; | 413 StatsCounter count_of_##name##_; |
388 INSTANCE_TYPE_LIST(SC) | 414 INSTANCE_TYPE_LIST(SC) |
(...skipping 21 matching lines...) Expand all Loading... |
410 // Sliding state window counters. | 436 // Sliding state window counters. |
411 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; | 437 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; |
412 friend class Isolate; | 438 friend class Isolate; |
413 | 439 |
414 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 440 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
415 }; | 441 }; |
416 | 442 |
417 } } // namespace v8::internal | 443 } } // namespace v8::internal |
418 | 444 |
419 #endif // V8_V8_COUNTERS_H_ | 445 #endif // V8_V8_COUNTERS_H_ |
OLD | NEW |