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/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 AHT(compile_lazy, V8.CompileLazyMicroSeconds) | 396 AHT(compile_lazy, V8.CompileLazyMicroSeconds) |
397 | 397 |
398 | 398 |
399 #define HISTOGRAM_PERCENTAGE_LIST(HP) \ | 399 #define HISTOGRAM_PERCENTAGE_LIST(HP) \ |
400 /* Heap fragmentation. */ \ | 400 /* Heap fragmentation. */ \ |
401 HP(external_fragmentation_total, V8.MemoryExternalFragmentationTotal) \ | 401 HP(external_fragmentation_total, V8.MemoryExternalFragmentationTotal) \ |
402 HP(external_fragmentation_old_space, V8.MemoryExternalFragmentationOldSpace) \ | 402 HP(external_fragmentation_old_space, V8.MemoryExternalFragmentationOldSpace) \ |
403 HP(external_fragmentation_code_space, \ | 403 HP(external_fragmentation_code_space, \ |
404 V8.MemoryExternalFragmentationCodeSpace) \ | 404 V8.MemoryExternalFragmentationCodeSpace) \ |
405 HP(external_fragmentation_map_space, V8.MemoryExternalFragmentationMapSpace) \ | 405 HP(external_fragmentation_map_space, V8.MemoryExternalFragmentationMapSpace) \ |
| 406 HP(external_fragmentation_cell_space, \ |
| 407 V8.MemoryExternalFragmentationCellSpace) \ |
406 HP(external_fragmentation_lo_space, V8.MemoryExternalFragmentationLoSpace) \ | 408 HP(external_fragmentation_lo_space, V8.MemoryExternalFragmentationLoSpace) \ |
407 /* Percentages of heap committed to each space. */ \ | 409 /* Percentages of heap committed to each space. */ \ |
408 HP(heap_fraction_new_space, V8.MemoryHeapFractionNewSpace) \ | 410 HP(heap_fraction_new_space, V8.MemoryHeapFractionNewSpace) \ |
409 HP(heap_fraction_old_space, V8.MemoryHeapFractionOldSpace) \ | 411 HP(heap_fraction_old_space, V8.MemoryHeapFractionOldSpace) \ |
410 HP(heap_fraction_code_space, V8.MemoryHeapFractionCodeSpace) \ | 412 HP(heap_fraction_code_space, V8.MemoryHeapFractionCodeSpace) \ |
411 HP(heap_fraction_map_space, V8.MemoryHeapFractionMapSpace) \ | 413 HP(heap_fraction_map_space, V8.MemoryHeapFractionMapSpace) \ |
| 414 HP(heap_fraction_cell_space, V8.MemoryHeapFractionCellSpace) \ |
412 HP(heap_fraction_lo_space, V8.MemoryHeapFractionLoSpace) \ | 415 HP(heap_fraction_lo_space, V8.MemoryHeapFractionLoSpace) \ |
413 /* Percentage of crankshafted codegen. */ \ | 416 /* Percentage of crankshafted codegen. */ \ |
414 HP(codegen_fraction_crankshaft, V8.CodegenFractionCrankshaft) | 417 HP(codegen_fraction_crankshaft, V8.CodegenFractionCrankshaft) |
415 | 418 |
416 | 419 |
417 #define HISTOGRAM_MEMORY_LIST(HM) \ | 420 #define HISTOGRAM_MEMORY_LIST(HM) \ |
418 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ | 421 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ |
419 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ | 422 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ |
420 HM(heap_sample_map_space_committed, \ | 423 HM(heap_sample_map_space_committed, \ |
421 V8.MemoryHeapSampleMapSpaceCommitted) \ | 424 V8.MemoryHeapSampleMapSpaceCommitted) \ |
| 425 HM(heap_sample_cell_space_committed, \ |
| 426 V8.MemoryHeapSampleCellSpaceCommitted) \ |
422 HM(heap_sample_code_space_committed, \ | 427 HM(heap_sample_code_space_committed, \ |
423 V8.MemoryHeapSampleCodeSpaceCommitted) \ | 428 V8.MemoryHeapSampleCodeSpaceCommitted) \ |
424 HM(heap_sample_maximum_committed, \ | 429 HM(heap_sample_maximum_committed, \ |
425 V8.MemoryHeapSampleMaximumCommitted) \ | 430 V8.MemoryHeapSampleMaximumCommitted) \ |
426 | 431 |
427 | 432 |
428 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 433 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
429 // Intellisense to crash. It was broken into two macros (each of length 40 | 434 // Intellisense to crash. It was broken into two macros (each of length 40 |
430 // lines) rather than one macro (of length about 80 lines) to work around | 435 // lines) rather than one macro (of length about 80 lines) to work around |
431 // this problem. Please avoid using recursive macros of this length when | 436 // this problem. Please avoid using recursive macros of this length when |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 SC(new_space_bytes_used, V8.MemoryNewSpaceBytesUsed) \ | 588 SC(new_space_bytes_used, V8.MemoryNewSpaceBytesUsed) \ |
584 SC(old_space_bytes_available, V8.MemoryOldSpaceBytesAvailable) \ | 589 SC(old_space_bytes_available, V8.MemoryOldSpaceBytesAvailable) \ |
585 SC(old_space_bytes_committed, V8.MemoryOldSpaceBytesCommitted) \ | 590 SC(old_space_bytes_committed, V8.MemoryOldSpaceBytesCommitted) \ |
586 SC(old_space_bytes_used, V8.MemoryOldSpaceBytesUsed) \ | 591 SC(old_space_bytes_used, V8.MemoryOldSpaceBytesUsed) \ |
587 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \ | 592 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \ |
588 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \ | 593 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \ |
589 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ | 594 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ |
590 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ | 595 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ |
591 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ | 596 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ |
592 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ | 597 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ |
| 598 SC(cell_space_bytes_available, V8.MemoryCellSpaceBytesAvailable) \ |
| 599 SC(cell_space_bytes_committed, V8.MemoryCellSpaceBytesCommitted) \ |
| 600 SC(cell_space_bytes_used, V8.MemoryCellSpaceBytesUsed) \ |
593 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ | 601 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ |
594 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ | 602 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ |
595 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) | 603 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) |
596 | 604 |
597 | 605 |
598 // This file contains all the v8 counters that are in use. | 606 // This file contains all the v8 counters that are in use. |
599 class Counters { | 607 class Counters { |
600 public: | 608 public: |
601 #define HR(name, caption, min, max, num_buckets) \ | 609 #define HR(name, caption, min, max, num_buckets) \ |
602 Histogram* name() { return &name##_; } | 610 Histogram* name() { return &name##_; } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 friend class Isolate; | 762 friend class Isolate; |
755 | 763 |
756 explicit Counters(Isolate* isolate); | 764 explicit Counters(Isolate* isolate); |
757 | 765 |
758 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 766 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
759 }; | 767 }; |
760 | 768 |
761 } } // namespace v8::internal | 769 } } // namespace v8::internal |
762 | 770 |
763 #endif // V8_COUNTERS_H_ | 771 #endif // V8_COUNTERS_H_ |
OLD | NEW |