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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 556 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
557 // Intellisense to crash. It was broken into two macros (each of length 40 | 557 // Intellisense to crash. It was broken into two macros (each of length 40 |
558 // lines) rather than one macro (of length about 80 lines) to work around | 558 // lines) rather than one macro (of length about 80 lines) to work around |
559 // this problem. Please avoid using recursive macros of this length when | 559 // this problem. Please avoid using recursive macros of this length when |
560 // possible. | 560 // possible. |
561 #define STATS_COUNTER_LIST_1(SC) \ | 561 #define STATS_COUNTER_LIST_1(SC) \ |
562 /* Global Handle Count*/ \ | 562 /* Global Handle Count*/ \ |
563 SC(global_handles, V8.GlobalHandles) \ | 563 SC(global_handles, V8.GlobalHandles) \ |
564 /* OS Memory allocated */ \ | 564 /* OS Memory allocated */ \ |
565 SC(memory_allocated, V8.OsMemoryAllocated) \ | 565 SC(memory_allocated, V8.OsMemoryAllocated) \ |
566 SC(normalized_maps, V8.NormalizedMaps) \ | 566 SC(maps_normalized, V8.MapsNormalized) \ |
| 567 SC(maps_created, V8.MapsCreated) \ |
| 568 SC(elements_transitions, V8.ObjectElementsTransitions) \ |
567 SC(props_to_dictionary, V8.ObjectPropertiesToDictionary) \ | 569 SC(props_to_dictionary, V8.ObjectPropertiesToDictionary) \ |
568 SC(elements_to_dictionary, V8.ObjectElementsToDictionary) \ | 570 SC(elements_to_dictionary, V8.ObjectElementsToDictionary) \ |
569 SC(alive_after_last_gc, V8.AliveAfterLastGC) \ | 571 SC(alive_after_last_gc, V8.AliveAfterLastGC) \ |
570 SC(objs_since_last_young, V8.ObjsSinceLastYoung) \ | 572 SC(objs_since_last_young, V8.ObjsSinceLastYoung) \ |
571 SC(objs_since_last_full, V8.ObjsSinceLastFull) \ | 573 SC(objs_since_last_full, V8.ObjsSinceLastFull) \ |
572 SC(string_table_capacity, V8.StringTableCapacity) \ | 574 SC(string_table_capacity, V8.StringTableCapacity) \ |
573 SC(number_of_symbols, V8.NumberOfSymbols) \ | 575 SC(number_of_symbols, V8.NumberOfSymbols) \ |
574 SC(script_wrappers, V8.ScriptWrappers) \ | 576 SC(script_wrappers, V8.ScriptWrappers) \ |
575 SC(call_initialize_stubs, V8.CallInitializeStubs) \ | |
576 SC(call_premonomorphic_stubs, V8.CallPreMonomorphicStubs) \ | |
577 SC(call_normal_stubs, V8.CallNormalStubs) \ | |
578 SC(call_megamorphic_stubs, V8.CallMegamorphicStubs) \ | |
579 SC(inlined_copied_elements, V8.InlinedCopiedElements) \ | 577 SC(inlined_copied_elements, V8.InlinedCopiedElements) \ |
580 SC(arguments_adaptors, V8.ArgumentsAdaptors) \ | 578 SC(arguments_adaptors, V8.ArgumentsAdaptors) \ |
581 SC(compilation_cache_hits, V8.CompilationCacheHits) \ | 579 SC(compilation_cache_hits, V8.CompilationCacheHits) \ |
582 SC(compilation_cache_misses, V8.CompilationCacheMisses) \ | 580 SC(compilation_cache_misses, V8.CompilationCacheMisses) \ |
583 /* Amount of evaled source code. */ \ | 581 /* Amount of evaled source code. */ \ |
584 SC(total_eval_size, V8.TotalEvalSize) \ | 582 SC(total_eval_size, V8.TotalEvalSize) \ |
585 /* Amount of loaded source code. */ \ | 583 /* Amount of loaded source code. */ \ |
586 SC(total_load_size, V8.TotalLoadSize) \ | 584 SC(total_load_size, V8.TotalLoadSize) \ |
587 /* Amount of parsed source code. */ \ | 585 /* Amount of parsed source code. */ \ |
588 SC(total_parse_size, V8.TotalParseSize) \ | 586 SC(total_parse_size, V8.TotalParseSize) \ |
589 /* Amount of source code skipped over using preparsing. */ \ | 587 /* Amount of source code skipped over using preparsing. */ \ |
590 SC(total_preparse_skipped, V8.TotalPreparseSkipped) \ | 588 SC(total_preparse_skipped, V8.TotalPreparseSkipped) \ |
591 /* Number of symbol lookups skipped using preparsing */ \ | |
592 SC(total_preparse_symbols_skipped, V8.TotalPreparseSymbolSkipped) \ | |
593 /* Amount of compiled source code. */ \ | 589 /* Amount of compiled source code. */ \ |
594 SC(total_compile_size, V8.TotalCompileSize) \ | 590 SC(total_compile_size, V8.TotalCompileSize) \ |
595 /* Amount of source code compiled with the full codegen. */ \ | 591 /* Amount of source code compiled with the full codegen. */ \ |
596 SC(total_full_codegen_source_size, V8.TotalFullCodegenSourceSize) \ | 592 SC(total_full_codegen_source_size, V8.TotalFullCodegenSourceSize) \ |
597 /* Number of contexts created from scratch. */ \ | 593 /* Number of contexts created from scratch. */ \ |
598 SC(contexts_created_from_scratch, V8.ContextsCreatedFromScratch) \ | 594 SC(contexts_created_from_scratch, V8.ContextsCreatedFromScratch) \ |
599 /* Number of contexts created by partial snapshot. */ \ | 595 /* Number of contexts created by partial snapshot. */ \ |
600 SC(contexts_created_by_snapshot, V8.ContextsCreatedBySnapshot) \ | 596 SC(contexts_created_by_snapshot, V8.ContextsCreatedBySnapshot) \ |
601 /* Number of code objects found from pc. */ \ | 597 /* Number of code objects found from pc. */ \ |
602 SC(pc_to_code, V8.PcToCode) \ | 598 SC(pc_to_code, V8.PcToCode) \ |
603 SC(pc_to_code_cached, V8.PcToCodeCached) \ | 599 SC(pc_to_code_cached, V8.PcToCodeCached) \ |
604 /* The store-buffer implementation of the write barrier. */ \ | 600 /* The store-buffer implementation of the write barrier. */ \ |
605 SC(store_buffer_compactions, V8.StoreBufferCompactions) \ | 601 SC(store_buffer_compactions, V8.StoreBufferCompactions) \ |
606 SC(store_buffer_overflows, V8.StoreBufferOverflows) | 602 SC(store_buffer_overflows, V8.StoreBufferOverflows) |
607 | 603 |
608 | 604 |
609 #define STATS_COUNTER_LIST_2(SC) \ | 605 #define STATS_COUNTER_LIST_2(SC) \ |
610 /* Number of code stubs. */ \ | 606 /* Number of code stubs. */ \ |
611 SC(code_stubs, V8.CodeStubs) \ | 607 SC(code_stubs, V8.CodeStubs) \ |
612 /* Amount of stub code. */ \ | 608 /* Amount of stub code. */ \ |
613 SC(total_stubs_code_size, V8.TotalStubsCodeSize) \ | 609 SC(total_stubs_code_size, V8.TotalStubsCodeSize) \ |
614 /* Amount of (JS) compiled code. */ \ | 610 /* Amount of (JS) compiled code. */ \ |
615 SC(total_compiled_code_size, V8.TotalCompiledCodeSize) \ | 611 SC(total_compiled_code_size, V8.TotalCompiledCodeSize) \ |
616 SC(gc_compactor_caused_by_request, V8.GCCompactorCausedByRequest) \ | 612 SC(gc_compactor_caused_by_request, V8.GCCompactorCausedByRequest) \ |
617 SC(gc_compactor_caused_by_promoted_data, V8.GCCompactorCausedByPromotedData) \ | 613 SC(gc_compactor_caused_by_promoted_data, V8.GCCompactorCausedByPromotedData) \ |
618 SC(gc_compactor_caused_by_oldspace_exhaustion, \ | 614 SC(gc_compactor_caused_by_oldspace_exhaustion, \ |
619 V8.GCCompactorCausedByOldspaceExhaustion) \ | 615 V8.GCCompactorCausedByOldspaceExhaustion) \ |
620 SC(gc_last_resort_from_js, V8.GCLastResortFromJS) \ | 616 SC(gc_last_resort_from_js, V8.GCLastResortFromJS) \ |
621 SC(gc_last_resort_from_handles, V8.GCLastResortFromHandles) \ | 617 SC(gc_last_resort_from_handles, V8.GCLastResortFromHandles) \ |
622 /* How is the generic keyed-load stub used? */ \ | 618 SC(ic_keyed_load_generic_smi, V8.ICKeyedLoadGenericSmi) \ |
623 SC(keyed_load_generic_smi, V8.KeyedLoadGenericSmi) \ | 619 SC(ic_keyed_load_generic_symbol, V8.ICKeyedLoadGenericSymbol) \ |
624 SC(keyed_load_generic_symbol, V8.KeyedLoadGenericSymbol) \ | 620 SC(ic_keyed_load_generic_slow, V8.ICKeyedLoadGenericSlow) \ |
625 SC(keyed_load_generic_lookup_cache, V8.KeyedLoadGenericLookupCache) \ | 621 SC(ic_named_load_global_stub, V8.ICNamedLoadGlobalStub) \ |
626 SC(keyed_load_generic_slow, V8.KeyedLoadGenericSlow) \ | 622 SC(ic_store_normal_miss, V8.ICStoreNormalMiss) \ |
627 SC(keyed_load_polymorphic_stubs, V8.KeyedLoadPolymorphicStubs) \ | 623 SC(ic_store_normal_hit, V8.ICStoreNormalHit) \ |
628 SC(keyed_load_external_array_slow, V8.KeyedLoadExternalArraySlow) \ | 624 SC(ic_binary_op_miss, V8.ICBinaryOpMiss) \ |
629 /* How is the generic keyed-call stub used? */ \ | 625 SC(ic_compare_miss, V8.ICCompareMiss) \ |
630 SC(keyed_call_generic_smi_fast, V8.KeyedCallGenericSmiFast) \ | 626 SC(ic_call_miss, V8.ICCallMiss) \ |
631 SC(keyed_call_generic_smi_dict, V8.KeyedCallGenericSmiDict) \ | 627 SC(ic_keyed_call_miss, V8.ICKeyedCallMiss) \ |
632 SC(keyed_call_generic_lookup_cache, V8.KeyedCallGenericLookupCache) \ | 628 SC(ic_load_miss, V8.ICLoadMiss) \ |
633 SC(keyed_call_generic_lookup_dict, V8.KeyedCallGenericLookupDict) \ | 629 SC(ic_keyed_load_miss, V8.ICKeyedLoadMiss) \ |
634 SC(keyed_call_generic_slow, V8.KeyedCallGenericSlow) \ | 630 SC(ic_store_miss, V8.ICStoreMiss) \ |
635 SC(keyed_call_generic_slow_load, V8.KeyedCallGenericSlowLoad) \ | 631 SC(ic_keyed_store_miss, V8.ICKeyedStoreMiss) \ |
636 SC(named_load_global_stub, V8.NamedLoadGlobalStub) \ | |
637 SC(named_store_global_inline, V8.NamedStoreGlobalInline) \ | |
638 SC(named_store_global_inline_miss, V8.NamedStoreGlobalInlineMiss) \ | |
639 SC(keyed_store_polymorphic_stubs, V8.KeyedStorePolymorphicStubs) \ | |
640 SC(keyed_store_external_array_slow, V8.KeyedStoreExternalArraySlow) \ | |
641 SC(store_normal_miss, V8.StoreNormalMiss) \ | |
642 SC(store_normal_hit, V8.StoreNormalHit) \ | |
643 SC(cow_arrays_created_stub, V8.COWArraysCreatedStub) \ | |
644 SC(cow_arrays_created_runtime, V8.COWArraysCreatedRuntime) \ | 632 SC(cow_arrays_created_runtime, V8.COWArraysCreatedRuntime) \ |
645 SC(cow_arrays_converted, V8.COWArraysConverted) \ | 633 SC(cow_arrays_converted, V8.COWArraysConverted) \ |
646 SC(call_miss, V8.CallMiss) \ | |
647 SC(keyed_call_miss, V8.KeyedCallMiss) \ | |
648 SC(load_miss, V8.LoadMiss) \ | |
649 SC(keyed_load_miss, V8.KeyedLoadMiss) \ | |
650 SC(call_const, V8.CallConst) \ | |
651 SC(call_const_fast_api, V8.CallConstFastApi) \ | |
652 SC(call_const_interceptor, V8.CallConstInterceptor) \ | |
653 SC(call_const_interceptor_fast_api, V8.CallConstInterceptorFastApi) \ | |
654 SC(call_global_inline, V8.CallGlobalInline) \ | |
655 SC(call_global_inline_miss, V8.CallGlobalInlineMiss) \ | |
656 SC(constructed_objects, V8.ConstructedObjects) \ | 634 SC(constructed_objects, V8.ConstructedObjects) \ |
657 SC(constructed_objects_runtime, V8.ConstructedObjectsRuntime) \ | 635 SC(constructed_objects_runtime, V8.ConstructedObjectsRuntime) \ |
658 SC(negative_lookups, V8.NegativeLookups) \ | 636 SC(negative_lookups, V8.NegativeLookups) \ |
659 SC(negative_lookups_miss, V8.NegativeLookupsMiss) \ | 637 SC(negative_lookups_miss, V8.NegativeLookupsMiss) \ |
660 SC(megamorphic_stub_cache_probes, V8.MegamorphicStubCacheProbes) \ | 638 SC(megamorphic_stub_cache_probes, V8.MegamorphicStubCacheProbes) \ |
661 SC(megamorphic_stub_cache_misses, V8.MegamorphicStubCacheMisses) \ | 639 SC(megamorphic_stub_cache_misses, V8.MegamorphicStubCacheMisses) \ |
662 SC(megamorphic_stub_cache_updates, V8.MegamorphicStubCacheUpdates) \ | 640 SC(megamorphic_stub_cache_updates, V8.MegamorphicStubCacheUpdates) \ |
663 SC(array_function_runtime, V8.ArrayFunctionRuntime) \ | |
664 SC(array_function_native, V8.ArrayFunctionNative) \ | |
665 SC(enum_cache_hits, V8.EnumCacheHits) \ | 641 SC(enum_cache_hits, V8.EnumCacheHits) \ |
666 SC(enum_cache_misses, V8.EnumCacheMisses) \ | 642 SC(enum_cache_misses, V8.EnumCacheMisses) \ |
667 SC(fast_new_closure_total, V8.FastNewClosureTotal) \ | 643 SC(fast_new_closure_total, V8.FastNewClosureTotal) \ |
668 SC(fast_new_closure_try_optimized, V8.FastNewClosureTryOptimized) \ | 644 SC(fast_new_closure_try_optimized, V8.FastNewClosureTryOptimized) \ |
669 SC(fast_new_closure_install_optimized, V8.FastNewClosureInstallOptimized) \ | 645 SC(fast_new_closure_install_optimized, V8.FastNewClosureInstallOptimized) \ |
670 SC(string_add_runtime, V8.StringAddRuntime) \ | 646 SC(string_add_runtime, V8.StringAddRuntime) \ |
671 SC(string_add_native, V8.StringAddNative) \ | 647 SC(string_add_native, V8.StringAddNative) \ |
672 SC(string_add_runtime_ext_to_one_byte, V8.StringAddRuntimeExtToOneByte) \ | 648 SC(string_add_runtime_ext_to_one_byte, V8.StringAddRuntimeExtToOneByte) \ |
673 SC(sub_string_runtime, V8.SubStringRuntime) \ | 649 SC(sub_string_runtime, V8.SubStringRuntime) \ |
674 SC(sub_string_native, V8.SubStringNative) \ | 650 SC(sub_string_native, V8.SubStringNative) \ |
675 SC(string_add_make_two_char, V8.StringAddMakeTwoChar) \ | |
676 SC(string_compare_native, V8.StringCompareNative) \ | 651 SC(string_compare_native, V8.StringCompareNative) \ |
677 SC(string_compare_runtime, V8.StringCompareRuntime) \ | 652 SC(string_compare_runtime, V8.StringCompareRuntime) \ |
678 SC(regexp_entry_runtime, V8.RegExpEntryRuntime) \ | 653 SC(regexp_entry_runtime, V8.RegExpEntryRuntime) \ |
679 SC(regexp_entry_native, V8.RegExpEntryNative) \ | 654 SC(regexp_entry_native, V8.RegExpEntryNative) \ |
680 SC(number_to_string_native, V8.NumberToStringNative) \ | 655 SC(number_to_string_native, V8.NumberToStringNative) \ |
681 SC(number_to_string_runtime, V8.NumberToStringRuntime) \ | 656 SC(number_to_string_runtime, V8.NumberToStringRuntime) \ |
682 SC(math_acos, V8.MathAcos) \ | 657 SC(math_acos_runtime, V8.MathAcosRuntime) \ |
683 SC(math_asin, V8.MathAsin) \ | 658 SC(math_asin_runtime, V8.MathAsinRuntime) \ |
684 SC(math_atan, V8.MathAtan) \ | 659 SC(math_atan_runtime, V8.MathAtanRuntime) \ |
685 SC(math_atan2, V8.MathAtan2) \ | 660 SC(math_atan2_runtime, V8.MathAtan2Runtime) \ |
686 SC(math_clz32, V8.MathClz32) \ | 661 SC(math_clz32_runtime, V8.MathClz32Runtime) \ |
687 SC(math_exp, V8.MathExp) \ | 662 SC(math_exp_runtime, V8.MathExpRuntime) \ |
688 SC(math_floor, V8.MathFloor) \ | 663 SC(math_floor_runtime, V8.MathFloorRuntime) \ |
689 SC(math_log, V8.MathLog) \ | 664 SC(math_log_runtime, V8.MathLogRuntime) \ |
690 SC(math_pow, V8.MathPow) \ | 665 SC(math_pow_runtime, V8.MathPowRuntime) \ |
691 SC(math_round, V8.MathRound) \ | 666 SC(math_round_runtime, V8.MathRoundRuntime) \ |
692 SC(math_sqrt, V8.MathSqrt) \ | 667 SC(math_sqrt_runtime, V8.MathSqrtRuntime) \ |
693 SC(stack_interrupts, V8.StackInterrupts) \ | 668 SC(stack_interrupts, V8.StackInterrupts) \ |
694 SC(runtime_profiler_ticks, V8.RuntimeProfilerTicks) \ | 669 SC(runtime_profiler_ticks, V8.RuntimeProfilerTicks) \ |
| 670 SC(runtime_calls, V8.RuntimeCalls) \ |
695 SC(bounds_checks_eliminated, V8.BoundsChecksEliminated) \ | 671 SC(bounds_checks_eliminated, V8.BoundsChecksEliminated) \ |
696 SC(bounds_checks_hoisted, V8.BoundsChecksHoisted) \ | 672 SC(bounds_checks_hoisted, V8.BoundsChecksHoisted) \ |
697 SC(soft_deopts_requested, V8.SoftDeoptsRequested) \ | 673 SC(soft_deopts_requested, V8.SoftDeoptsRequested) \ |
698 SC(soft_deopts_inserted, V8.SoftDeoptsInserted) \ | 674 SC(soft_deopts_inserted, V8.SoftDeoptsInserted) \ |
699 SC(soft_deopts_executed, V8.SoftDeoptsExecuted) \ | 675 SC(soft_deopts_executed, V8.SoftDeoptsExecuted) \ |
700 /* Number of write barriers in generated code. */ \ | 676 /* Number of write barriers in generated code. */ \ |
701 SC(write_barriers_dynamic, V8.WriteBarriersDynamic) \ | 677 SC(write_barriers_dynamic, V8.WriteBarriersDynamic) \ |
702 SC(write_barriers_static, V8.WriteBarriersStatic) \ | 678 SC(write_barriers_static, V8.WriteBarriersStatic) \ |
703 SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable) \ | 679 SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable) \ |
704 SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted) \ | 680 SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted) \ |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 | 875 |
900 explicit Counters(Isolate* isolate); | 876 explicit Counters(Isolate* isolate); |
901 | 877 |
902 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 878 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
903 }; | 879 }; |
904 | 880 |
905 } // namespace internal | 881 } // namespace internal |
906 } // namespace v8 | 882 } // namespace v8 |
907 | 883 |
908 #endif // V8_COUNTERS_H_ | 884 #endif // V8_COUNTERS_H_ |
OLD | NEW |