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