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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 HP(external_fragmentation_old_pointer_space, \ | 403 HP(external_fragmentation_old_pointer_space, \ |
404 V8.MemoryExternalFragmentationOldPointerSpace) \ | 404 V8.MemoryExternalFragmentationOldPointerSpace) \ |
405 HP(external_fragmentation_old_data_space, \ | 405 HP(external_fragmentation_old_data_space, \ |
406 V8.MemoryExternalFragmentationOldDataSpace) \ | 406 V8.MemoryExternalFragmentationOldDataSpace) \ |
407 HP(external_fragmentation_code_space, \ | 407 HP(external_fragmentation_code_space, \ |
408 V8.MemoryExternalFragmentationCodeSpace) \ | 408 V8.MemoryExternalFragmentationCodeSpace) \ |
409 HP(external_fragmentation_map_space, \ | 409 HP(external_fragmentation_map_space, \ |
410 V8.MemoryExternalFragmentationMapSpace) \ | 410 V8.MemoryExternalFragmentationMapSpace) \ |
411 HP(external_fragmentation_cell_space, \ | 411 HP(external_fragmentation_cell_space, \ |
412 V8.MemoryExternalFragmentationCellSpace) \ | 412 V8.MemoryExternalFragmentationCellSpace) \ |
413 HP(external_fragmentation_property_cell_space, \ | |
414 V8.MemoryExternalFragmentationPropertyCellSpace) \ | |
415 HP(external_fragmentation_lo_space, \ | 413 HP(external_fragmentation_lo_space, \ |
416 V8.MemoryExternalFragmentationLoSpace) \ | 414 V8.MemoryExternalFragmentationLoSpace) \ |
417 /* Percentages of heap committed to each space. */ \ | 415 /* Percentages of heap committed to each space. */ \ |
418 HP(heap_fraction_new_space, \ | 416 HP(heap_fraction_new_space, \ |
419 V8.MemoryHeapFractionNewSpace) \ | 417 V8.MemoryHeapFractionNewSpace) \ |
420 HP(heap_fraction_old_pointer_space, \ | 418 HP(heap_fraction_old_pointer_space, \ |
421 V8.MemoryHeapFractionOldPointerSpace) \ | 419 V8.MemoryHeapFractionOldPointerSpace) \ |
422 HP(heap_fraction_old_data_space, \ | 420 HP(heap_fraction_old_data_space, \ |
423 V8.MemoryHeapFractionOldDataSpace) \ | 421 V8.MemoryHeapFractionOldDataSpace) \ |
424 HP(heap_fraction_code_space, \ | 422 HP(heap_fraction_code_space, \ |
425 V8.MemoryHeapFractionCodeSpace) \ | 423 V8.MemoryHeapFractionCodeSpace) \ |
426 HP(heap_fraction_map_space, \ | 424 HP(heap_fraction_map_space, \ |
427 V8.MemoryHeapFractionMapSpace) \ | 425 V8.MemoryHeapFractionMapSpace) \ |
428 HP(heap_fraction_cell_space, \ | 426 HP(heap_fraction_cell_space, \ |
429 V8.MemoryHeapFractionCellSpace) \ | 427 V8.MemoryHeapFractionCellSpace) \ |
430 HP(heap_fraction_property_cell_space, \ | |
431 V8.MemoryHeapFractionPropertyCellSpace) \ | |
432 HP(heap_fraction_lo_space, \ | 428 HP(heap_fraction_lo_space, \ |
433 V8.MemoryHeapFractionLoSpace) \ | 429 V8.MemoryHeapFractionLoSpace) \ |
434 /* Percentage of crankshafted codegen. */ \ | 430 /* Percentage of crankshafted codegen. */ \ |
435 HP(codegen_fraction_crankshaft, \ | 431 HP(codegen_fraction_crankshaft, \ |
436 V8.CodegenFractionCrankshaft) \ | 432 V8.CodegenFractionCrankshaft) \ |
437 | 433 |
438 | 434 |
439 #define HISTOGRAM_MEMORY_LIST(HM) \ | 435 #define HISTOGRAM_MEMORY_LIST(HM) \ |
440 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ | 436 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ |
441 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ | 437 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ |
442 HM(heap_sample_map_space_committed, \ | 438 HM(heap_sample_map_space_committed, \ |
443 V8.MemoryHeapSampleMapSpaceCommitted) \ | 439 V8.MemoryHeapSampleMapSpaceCommitted) \ |
444 HM(heap_sample_cell_space_committed, \ | 440 HM(heap_sample_cell_space_committed, \ |
445 V8.MemoryHeapSampleCellSpaceCommitted) \ | 441 V8.MemoryHeapSampleCellSpaceCommitted) \ |
446 HM(heap_sample_property_cell_space_committed, \ | |
447 V8.MemoryHeapSamplePropertyCellSpaceCommitted) \ | |
448 HM(heap_sample_code_space_committed, \ | 442 HM(heap_sample_code_space_committed, \ |
449 V8.MemoryHeapSampleCodeSpaceCommitted) \ | 443 V8.MemoryHeapSampleCodeSpaceCommitted) \ |
450 HM(heap_sample_maximum_committed, \ | 444 HM(heap_sample_maximum_committed, \ |
451 V8.MemoryHeapSampleMaximumCommitted) \ | 445 V8.MemoryHeapSampleMaximumCommitted) \ |
452 | 446 |
453 | 447 |
454 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 448 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
455 // Intellisense to crash. It was broken into two macros (each of length 40 | 449 // Intellisense to crash. It was broken into two macros (each of length 40 |
456 // lines) rather than one macro (of length about 80 lines) to work around | 450 // lines) rather than one macro (of length about 80 lines) to work around |
457 // this problem. Please avoid using recursive macros of this length when | 451 // this problem. Please avoid using recursive macros of this length when |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 SC(old_data_space_bytes_used, V8.MemoryOldDataSpaceBytesUsed) \ | 610 SC(old_data_space_bytes_used, V8.MemoryOldDataSpaceBytesUsed) \ |
617 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \ | 611 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \ |
618 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \ | 612 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \ |
619 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ | 613 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ |
620 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ | 614 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ |
621 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ | 615 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ |
622 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ | 616 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ |
623 SC(cell_space_bytes_available, V8.MemoryCellSpaceBytesAvailable) \ | 617 SC(cell_space_bytes_available, V8.MemoryCellSpaceBytesAvailable) \ |
624 SC(cell_space_bytes_committed, V8.MemoryCellSpaceBytesCommitted) \ | 618 SC(cell_space_bytes_committed, V8.MemoryCellSpaceBytesCommitted) \ |
625 SC(cell_space_bytes_used, V8.MemoryCellSpaceBytesUsed) \ | 619 SC(cell_space_bytes_used, V8.MemoryCellSpaceBytesUsed) \ |
626 SC(property_cell_space_bytes_available, \ | |
627 V8.MemoryPropertyCellSpaceBytesAvailable) \ | |
628 SC(property_cell_space_bytes_committed, \ | |
629 V8.MemoryPropertyCellSpaceBytesCommitted) \ | |
630 SC(property_cell_space_bytes_used, V8.MemoryPropertyCellSpaceBytesUsed) \ | |
631 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ | 620 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ |
632 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ | 621 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ |
633 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) | 622 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) |
634 | 623 |
635 | 624 |
636 // This file contains all the v8 counters that are in use. | 625 // This file contains all the v8 counters that are in use. |
637 class Counters { | 626 class Counters { |
638 public: | 627 public: |
639 #define HR(name, caption, min, max, num_buckets) \ | 628 #define HR(name, caption, min, max, num_buckets) \ |
640 Histogram* name() { return &name##_; } | 629 Histogram* name() { return &name##_; } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 friend class Isolate; | 781 friend class Isolate; |
793 | 782 |
794 explicit Counters(Isolate* isolate); | 783 explicit Counters(Isolate* isolate); |
795 | 784 |
796 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 785 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
797 }; | 786 }; |
798 | 787 |
799 } } // namespace v8::internal | 788 } } // namespace v8::internal |
800 | 789 |
801 #endif // V8_COUNTERS_H_ | 790 #endif // V8_COUNTERS_H_ |
OLD | NEW |