| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 | 581 |
| 582 #define HISTOGRAM_RANGE_LIST(HR) \ | 582 #define HISTOGRAM_RANGE_LIST(HR) \ |
| 583 /* Generic range histograms */ \ | 583 /* Generic range histograms */ \ |
| 584 HR(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \ | 584 HR(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \ |
| 585 HR(gc_idle_time_allotted_in_ms, V8.GCIdleTimeAllottedInMS, 0, 10000, 101) \ | 585 HR(gc_idle_time_allotted_in_ms, V8.GCIdleTimeAllottedInMS, 0, 10000, 101) \ |
| 586 HR(gc_idle_time_limit_overshot, V8.GCIdleTimeLimit.Overshot, 0, 10000, 101) \ | 586 HR(gc_idle_time_limit_overshot, V8.GCIdleTimeLimit.Overshot, 0, 10000, 101) \ |
| 587 HR(gc_idle_time_limit_undershot, V8.GCIdleTimeLimit.Undershot, 0, 10000, \ | 587 HR(gc_idle_time_limit_undershot, V8.GCIdleTimeLimit.Undershot, 0, 10000, \ |
| 588 101) \ | 588 101) \ |
| 589 HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ | 589 HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ |
| 590 HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ | 590 HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ |
| 591 HR(debug_feature_usage, V8.DebugFeatureUsage, 1, 7, 7) | 591 HR(debug_feature_usage, V8.DebugFeatureUsage, 1, 7, 7) \ |
| 592 /* Asm/Wasm. */ \ |
| 593 HR(wasm_functions_per_module, V8.WasmFunctionsPerModule, 0, 10000, 101) |
| 592 | 594 |
| 593 #define HISTOGRAM_TIMER_LIST(HT) \ | 595 #define HISTOGRAM_TIMER_LIST(HT) \ |
| 594 /* Garbage collection timers. */ \ | 596 /* Garbage collection timers. */ \ |
| 595 HT(gc_compactor, V8.GCCompactor, 10000, MILLISECOND) \ | 597 HT(gc_compactor, V8.GCCompactor, 10000, MILLISECOND) \ |
| 596 HT(gc_finalize, V8.GCFinalizeMC, 10000, MILLISECOND) \ | 598 HT(gc_finalize, V8.GCFinalizeMC, 10000, MILLISECOND) \ |
| 597 HT(gc_finalize_reduce_memory, V8.GCFinalizeMCReduceMemory, 10000, \ | 599 HT(gc_finalize_reduce_memory, V8.GCFinalizeMCReduceMemory, 10000, \ |
| 598 MILLISECOND) \ | 600 MILLISECOND) \ |
| 599 HT(gc_scavenger, V8.GCScavenger, 10000, MILLISECOND) \ | 601 HT(gc_scavenger, V8.GCScavenger, 10000, MILLISECOND) \ |
| 600 HT(gc_context, V8.GCContext, 10000, \ | 602 HT(gc_context, V8.GCContext, 10000, \ |
| 601 MILLISECOND) /* GC context cleanup time */ \ | 603 MILLISECOND) /* GC context cleanup time */ \ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 612 HT(parse_lazy, V8.ParseLazyMicroSeconds, 1000000, MICROSECOND) \ | 614 HT(parse_lazy, V8.ParseLazyMicroSeconds, 1000000, MICROSECOND) \ |
| 613 HT(pre_parse, V8.PreParseMicroSeconds, 1000000, MICROSECOND) \ | 615 HT(pre_parse, V8.PreParseMicroSeconds, 1000000, MICROSECOND) \ |
| 614 /* Compilation times. */ \ | 616 /* Compilation times. */ \ |
| 615 HT(compile, V8.CompileMicroSeconds, 1000000, MICROSECOND) \ | 617 HT(compile, V8.CompileMicroSeconds, 1000000, MICROSECOND) \ |
| 616 HT(compile_eval, V8.CompileEvalMicroSeconds, 1000000, MICROSECOND) \ | 618 HT(compile_eval, V8.CompileEvalMicroSeconds, 1000000, MICROSECOND) \ |
| 617 /* Serialization as part of compilation (code caching) */ \ | 619 /* Serialization as part of compilation (code caching) */ \ |
| 618 HT(compile_serialize, V8.CompileSerializeMicroSeconds, 100000, MICROSECOND) \ | 620 HT(compile_serialize, V8.CompileSerializeMicroSeconds, 100000, MICROSECOND) \ |
| 619 HT(compile_deserialize, V8.CompileDeserializeMicroSeconds, 1000000, \ | 621 HT(compile_deserialize, V8.CompileDeserializeMicroSeconds, 1000000, \ |
| 620 MICROSECOND) \ | 622 MICROSECOND) \ |
| 621 /* Total compilation time incl. caching/parsing */ \ | 623 /* Total compilation time incl. caching/parsing */ \ |
| 622 HT(compile_script, V8.CompileScriptMicroSeconds, 1000000, MICROSECOND) | 624 HT(compile_script, V8.CompileScriptMicroSeconds, 1000000, MICROSECOND) \ |
| 623 | 625 /* Asm/Wasm */ \ |
| 626 HT(wasm_instantiate_time, V8.WasmInstantiateMicroSeconds, 1000000, \ |
| 627 MICROSECOND) \ |
| 628 HT(wasm_decode_module_time, V8.WasmDecodeModuleMicroSeconds, 1000000, \ |
| 629 MICROSECOND) \ |
| 630 HT(wasm_decode_function_time, V8.WasmDecodeFunctionMicroSeconds, 1000000, \ |
| 631 MICROSECOND) \ |
| 632 HT(wasm_compile_time, V8.WasmCompileMicroSeconds, 1000000, MICROSECOND) \ |
| 633 HT(wasm_compile_function_time, V8.WasmCompileFunctionMicroSeconds, 1000000, \ |
| 634 MICROSECOND) |
| 624 | 635 |
| 625 #define AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) \ | 636 #define AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) \ |
| 626 AHT(compile_lazy, V8.CompileLazyMicroSeconds) | 637 AHT(compile_lazy, V8.CompileLazyMicroSeconds) |
| 627 | 638 |
| 628 | 639 |
| 629 #define HISTOGRAM_PERCENTAGE_LIST(HP) \ | 640 #define HISTOGRAM_PERCENTAGE_LIST(HP) \ |
| 630 /* Heap fragmentation. */ \ | 641 /* Heap fragmentation. */ \ |
| 631 HP(external_fragmentation_total, V8.MemoryExternalFragmentationTotal) \ | 642 HP(external_fragmentation_total, V8.MemoryExternalFragmentationTotal) \ |
| 632 HP(external_fragmentation_old_space, V8.MemoryExternalFragmentationOldSpace) \ | 643 HP(external_fragmentation_old_space, V8.MemoryExternalFragmentationOldSpace) \ |
| 633 HP(external_fragmentation_code_space, \ | 644 HP(external_fragmentation_code_space, \ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 644 HP(codegen_fraction_crankshaft, V8.CodegenFractionCrankshaft) | 655 HP(codegen_fraction_crankshaft, V8.CodegenFractionCrankshaft) |
| 645 | 656 |
| 646 | 657 |
| 647 #define HISTOGRAM_LEGACY_MEMORY_LIST(HM) \ | 658 #define HISTOGRAM_LEGACY_MEMORY_LIST(HM) \ |
| 648 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ | 659 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ |
| 649 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ | 660 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ |
| 650 HM(heap_sample_map_space_committed, V8.MemoryHeapSampleMapSpaceCommitted) \ | 661 HM(heap_sample_map_space_committed, V8.MemoryHeapSampleMapSpaceCommitted) \ |
| 651 HM(heap_sample_code_space_committed, V8.MemoryHeapSampleCodeSpaceCommitted) \ | 662 HM(heap_sample_code_space_committed, V8.MemoryHeapSampleCodeSpaceCommitted) \ |
| 652 HM(heap_sample_maximum_committed, V8.MemoryHeapSampleMaximumCommitted) | 663 HM(heap_sample_maximum_committed, V8.MemoryHeapSampleMaximumCommitted) |
| 653 | 664 |
| 654 #define HISTOGRAM_MEMORY_LIST(HM) \ | 665 #define HISTOGRAM_MEMORY_LIST(HM) \ |
| 655 HM(memory_heap_committed, V8.MemoryHeapCommitted) \ | 666 HM(memory_heap_committed, V8.MemoryHeapCommitted) \ |
| 656 HM(memory_heap_used, V8.MemoryHeapUsed) | 667 HM(memory_heap_used, V8.MemoryHeapUsed) \ |
| 657 | 668 /* Asm/Wasm */ \ |
| 669 HM(wasm_decode_peak_memory, V8.WasmDecodePeakMemory) \ |
| 670 HM(wasm_instantiate_peak_memory, V8.WasmInstantiatePeakMemory) \ |
| 671 HM(wasm_compile_function_peak_memory, V8.WasmCompileFunctionPeakMemory) \ |
| 672 HM(wasm_min_mem_pages_memory, V8.WasmMinMemPagesMemory) \ |
| 673 HM(wasm_max_mem_pages_memory, V8.WasmMaxMemPagesMemory) \ |
| 674 HM(wasm_function_bytes, V8.WasmFunctionBytes) \ |
| 675 HM(wasm_module_bytes, V8.WasmModuleBytes) |
| 658 | 676 |
| 659 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 677 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
| 660 // Intellisense to crash. It was broken into two macros (each of length 40 | 678 // Intellisense to crash. It was broken into two macros (each of length 40 |
| 661 // lines) rather than one macro (of length about 80 lines) to work around | 679 // lines) rather than one macro (of length about 80 lines) to work around |
| 662 // this problem. Please avoid using recursive macros of this length when | 680 // this problem. Please avoid using recursive macros of this length when |
| 663 // possible. | 681 // possible. |
| 664 #define STATS_COUNTER_LIST_1(SC) \ | 682 #define STATS_COUNTER_LIST_1(SC) \ |
| 665 /* Global Handle Count*/ \ | 683 /* Global Handle Count*/ \ |
| 666 SC(global_handles, V8.GlobalHandles) \ | 684 SC(global_handles, V8.GlobalHandles) \ |
| 667 /* OS Memory allocated */ \ | 685 /* OS Memory allocated */ \ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 696 /* Number of contexts created from scratch. */ \ | 714 /* Number of contexts created from scratch. */ \ |
| 697 SC(contexts_created_from_scratch, V8.ContextsCreatedFromScratch) \ | 715 SC(contexts_created_from_scratch, V8.ContextsCreatedFromScratch) \ |
| 698 /* Number of contexts created by partial snapshot. */ \ | 716 /* Number of contexts created by partial snapshot. */ \ |
| 699 SC(contexts_created_by_snapshot, V8.ContextsCreatedBySnapshot) \ | 717 SC(contexts_created_by_snapshot, V8.ContextsCreatedBySnapshot) \ |
| 700 /* Number of code objects found from pc. */ \ | 718 /* Number of code objects found from pc. */ \ |
| 701 SC(pc_to_code, V8.PcToCode) \ | 719 SC(pc_to_code, V8.PcToCode) \ |
| 702 SC(pc_to_code_cached, V8.PcToCodeCached) \ | 720 SC(pc_to_code_cached, V8.PcToCodeCached) \ |
| 703 /* The store-buffer implementation of the write barrier. */ \ | 721 /* The store-buffer implementation of the write barrier. */ \ |
| 704 SC(store_buffer_overflows, V8.StoreBufferOverflows) | 722 SC(store_buffer_overflows, V8.StoreBufferOverflows) |
| 705 | 723 |
| 706 | |
| 707 #define STATS_COUNTER_LIST_2(SC) \ | 724 #define STATS_COUNTER_LIST_2(SC) \ |
| 708 /* Number of code stubs. */ \ | 725 /* Number of code stubs. */ \ |
| 709 SC(code_stubs, V8.CodeStubs) \ | 726 SC(code_stubs, V8.CodeStubs) \ |
| 710 /* Amount of stub code. */ \ | 727 /* Amount of stub code. */ \ |
| 711 SC(total_stubs_code_size, V8.TotalStubsCodeSize) \ | 728 SC(total_stubs_code_size, V8.TotalStubsCodeSize) \ |
| 712 /* Amount of (JS) compiled code. */ \ | 729 /* Amount of (JS) compiled code. */ \ |
| 713 SC(total_compiled_code_size, V8.TotalCompiledCodeSize) \ | 730 SC(total_compiled_code_size, V8.TotalCompiledCodeSize) \ |
| 714 SC(gc_compactor_caused_by_request, V8.GCCompactorCausedByRequest) \ | 731 SC(gc_compactor_caused_by_request, V8.GCCompactorCausedByRequest) \ |
| 715 SC(gc_compactor_caused_by_promoted_data, V8.GCCompactorCausedByPromotedData) \ | 732 SC(gc_compactor_caused_by_promoted_data, V8.GCCompactorCausedByPromotedData) \ |
| 716 SC(gc_compactor_caused_by_oldspace_exhaustion, \ | 733 SC(gc_compactor_caused_by_oldspace_exhaustion, \ |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 SC(regexp_entry_native, V8.RegExpEntryNative) \ | 773 SC(regexp_entry_native, V8.RegExpEntryNative) \ |
| 757 SC(number_to_string_native, V8.NumberToStringNative) \ | 774 SC(number_to_string_native, V8.NumberToStringNative) \ |
| 758 SC(number_to_string_runtime, V8.NumberToStringRuntime) \ | 775 SC(number_to_string_runtime, V8.NumberToStringRuntime) \ |
| 759 SC(math_atan2_runtime, V8.MathAtan2Runtime) \ | 776 SC(math_atan2_runtime, V8.MathAtan2Runtime) \ |
| 760 SC(math_clz32_runtime, V8.MathClz32Runtime) \ | 777 SC(math_clz32_runtime, V8.MathClz32Runtime) \ |
| 761 SC(math_exp_runtime, V8.MathExpRuntime) \ | 778 SC(math_exp_runtime, V8.MathExpRuntime) \ |
| 762 SC(math_log_runtime, V8.MathLogRuntime) \ | 779 SC(math_log_runtime, V8.MathLogRuntime) \ |
| 763 SC(math_pow_runtime, V8.MathPowRuntime) \ | 780 SC(math_pow_runtime, V8.MathPowRuntime) \ |
| 764 SC(stack_interrupts, V8.StackInterrupts) \ | 781 SC(stack_interrupts, V8.StackInterrupts) \ |
| 765 SC(runtime_profiler_ticks, V8.RuntimeProfilerTicks) \ | 782 SC(runtime_profiler_ticks, V8.RuntimeProfilerTicks) \ |
| 766 SC(runtime_calls, V8.RuntimeCalls) \ | 783 SC(runtime_calls, V8.RuntimeCalls) \ |
| 767 SC(bounds_checks_eliminated, V8.BoundsChecksEliminated) \ | 784 SC(bounds_checks_eliminated, V8.BoundsChecksEliminated) \ |
| 768 SC(bounds_checks_hoisted, V8.BoundsChecksHoisted) \ | 785 SC(bounds_checks_hoisted, V8.BoundsChecksHoisted) \ |
| 769 SC(soft_deopts_requested, V8.SoftDeoptsRequested) \ | 786 SC(soft_deopts_requested, V8.SoftDeoptsRequested) \ |
| 770 SC(soft_deopts_inserted, V8.SoftDeoptsInserted) \ | 787 SC(soft_deopts_inserted, V8.SoftDeoptsInserted) \ |
| 771 SC(soft_deopts_executed, V8.SoftDeoptsExecuted) \ | 788 SC(soft_deopts_executed, V8.SoftDeoptsExecuted) \ |
| 772 /* Number of write barriers in generated code. */ \ | 789 /* Number of write barriers in generated code. */ \ |
| 773 SC(write_barriers_dynamic, V8.WriteBarriersDynamic) \ | 790 SC(write_barriers_dynamic, V8.WriteBarriersDynamic) \ |
| 774 SC(write_barriers_static, V8.WriteBarriersStatic) \ | 791 SC(write_barriers_static, V8.WriteBarriersStatic) \ |
| 775 SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable) \ | 792 SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable) \ |
| 776 SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted) \ | 793 SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted) \ |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 | 991 |
| 975 explicit Counters(Isolate* isolate); | 992 explicit Counters(Isolate* isolate); |
| 976 | 993 |
| 977 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 994 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
| 978 }; | 995 }; |
| 979 | 996 |
| 980 } // namespace internal | 997 } // namespace internal |
| 981 } // namespace v8 | 998 } // namespace v8 |
| 982 | 999 |
| 983 #endif // V8_COUNTERS_H_ | 1000 #endif // V8_COUNTERS_H_ |
| OLD | NEW |