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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, \ | 406 HP(external_fragmentation_cell_space, \ |
407 V8.MemoryExternalFragmentationCellSpace) \ | 407 V8.MemoryExternalFragmentationCellSpace) \ |
408 HP(external_fragmentation_property_cell_space, \ | |
409 V8.MemoryExternalFragmentationPropertyCellSpace) \ | |
410 HP(external_fragmentation_lo_space, V8.MemoryExternalFragmentationLoSpace) \ | 408 HP(external_fragmentation_lo_space, V8.MemoryExternalFragmentationLoSpace) \ |
411 /* Percentages of heap committed to each space. */ \ | 409 /* Percentages of heap committed to each space. */ \ |
412 HP(heap_fraction_new_space, V8.MemoryHeapFractionNewSpace) \ | 410 HP(heap_fraction_new_space, V8.MemoryHeapFractionNewSpace) \ |
413 HP(heap_fraction_old_space, V8.MemoryHeapFractionOldSpace) \ | 411 HP(heap_fraction_old_space, V8.MemoryHeapFractionOldSpace) \ |
414 HP(heap_fraction_code_space, V8.MemoryHeapFractionCodeSpace) \ | 412 HP(heap_fraction_code_space, V8.MemoryHeapFractionCodeSpace) \ |
415 HP(heap_fraction_map_space, V8.MemoryHeapFractionMapSpace) \ | 413 HP(heap_fraction_map_space, V8.MemoryHeapFractionMapSpace) \ |
416 HP(heap_fraction_cell_space, V8.MemoryHeapFractionCellSpace) \ | 414 HP(heap_fraction_cell_space, V8.MemoryHeapFractionCellSpace) \ |
417 HP(heap_fraction_property_cell_space, \ | |
418 V8.MemoryHeapFractionPropertyCellSpace) \ | |
419 HP(heap_fraction_lo_space, V8.MemoryHeapFractionLoSpace) \ | 415 HP(heap_fraction_lo_space, V8.MemoryHeapFractionLoSpace) \ |
420 /* Percentage of crankshafted codegen. */ \ | 416 /* Percentage of crankshafted codegen. */ \ |
421 HP(codegen_fraction_crankshaft, V8.CodegenFractionCrankshaft) | 417 HP(codegen_fraction_crankshaft, V8.CodegenFractionCrankshaft) |
422 | 418 |
423 | 419 |
424 #define HISTOGRAM_MEMORY_LIST(HM) \ | 420 #define HISTOGRAM_MEMORY_LIST(HM) \ |
425 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ | 421 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ |
426 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ | 422 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ |
427 HM(heap_sample_map_space_committed, \ | 423 HM(heap_sample_map_space_committed, \ |
428 V8.MemoryHeapSampleMapSpaceCommitted) \ | 424 V8.MemoryHeapSampleMapSpaceCommitted) \ |
429 HM(heap_sample_cell_space_committed, \ | 425 HM(heap_sample_cell_space_committed, \ |
430 V8.MemoryHeapSampleCellSpaceCommitted) \ | 426 V8.MemoryHeapSampleCellSpaceCommitted) \ |
431 HM(heap_sample_property_cell_space_committed, \ | |
432 V8.MemoryHeapSamplePropertyCellSpaceCommitted) \ | |
433 HM(heap_sample_code_space_committed, \ | 427 HM(heap_sample_code_space_committed, \ |
434 V8.MemoryHeapSampleCodeSpaceCommitted) \ | 428 V8.MemoryHeapSampleCodeSpaceCommitted) \ |
435 HM(heap_sample_maximum_committed, \ | 429 HM(heap_sample_maximum_committed, \ |
436 V8.MemoryHeapSampleMaximumCommitted) \ | 430 V8.MemoryHeapSampleMaximumCommitted) \ |
437 | 431 |
438 | 432 |
439 // 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 |
440 // 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 |
441 // 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 |
442 // this problem. Please avoid using recursive macros of this length when | 436 // this problem. Please avoid using recursive macros of this length when |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 SC(old_space_bytes_used, V8.MemoryOldSpaceBytesUsed) \ | 590 SC(old_space_bytes_used, V8.MemoryOldSpaceBytesUsed) \ |
597 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \ | 591 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \ |
598 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \ | 592 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \ |
599 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ | 593 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \ |
600 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ | 594 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \ |
601 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ | 595 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \ |
602 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ | 596 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \ |
603 SC(cell_space_bytes_available, V8.MemoryCellSpaceBytesAvailable) \ | 597 SC(cell_space_bytes_available, V8.MemoryCellSpaceBytesAvailable) \ |
604 SC(cell_space_bytes_committed, V8.MemoryCellSpaceBytesCommitted) \ | 598 SC(cell_space_bytes_committed, V8.MemoryCellSpaceBytesCommitted) \ |
605 SC(cell_space_bytes_used, V8.MemoryCellSpaceBytesUsed) \ | 599 SC(cell_space_bytes_used, V8.MemoryCellSpaceBytesUsed) \ |
606 SC(property_cell_space_bytes_available, \ | |
607 V8.MemoryPropertyCellSpaceBytesAvailable) \ | |
608 SC(property_cell_space_bytes_committed, \ | |
609 V8.MemoryPropertyCellSpaceBytesCommitted) \ | |
610 SC(property_cell_space_bytes_used, V8.MemoryPropertyCellSpaceBytesUsed) \ | |
611 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ | 600 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \ |
612 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ | 601 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \ |
613 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) | 602 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) |
614 | 603 |
615 | 604 |
616 // This file contains all the v8 counters that are in use. | 605 // This file contains all the v8 counters that are in use. |
617 class Counters { | 606 class Counters { |
618 public: | 607 public: |
619 #define HR(name, caption, min, max, num_buckets) \ | 608 #define HR(name, caption, min, max, num_buckets) \ |
620 Histogram* name() { return &name##_; } | 609 Histogram* name() { return &name##_; } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 friend class Isolate; | 761 friend class Isolate; |
773 | 762 |
774 explicit Counters(Isolate* isolate); | 763 explicit Counters(Isolate* isolate); |
775 | 764 |
776 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 765 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
777 }; | 766 }; |
778 | 767 |
779 } } // namespace v8::internal | 768 } } // namespace v8::internal |
780 | 769 |
781 #endif // V8_COUNTERS_H_ | 770 #endif // V8_COUNTERS_H_ |
OLD | NEW |