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/atomic-utils.h" | 10 #include "src/base/atomic-utils.h" |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 V(ParseFunction) \ | 728 V(ParseFunction) \ |
729 V(PropertyCallback) \ | 729 V(PropertyCallback) \ |
730 V(PrototypeMap_TransitionToAccessorProperty) \ | 730 V(PrototypeMap_TransitionToAccessorProperty) \ |
731 V(PrototypeMap_TransitionToDataProperty) \ | 731 V(PrototypeMap_TransitionToDataProperty) \ |
732 V(PrototypeObject_DeleteProperty) \ | 732 V(PrototypeObject_DeleteProperty) \ |
733 V(RecompileConcurrent) \ | 733 V(RecompileConcurrent) \ |
734 V(RecompileSynchronous) \ | 734 V(RecompileSynchronous) \ |
735 /* Dummy counter for the unexpected stub miss. */ \ | 735 /* Dummy counter for the unexpected stub miss. */ \ |
736 V(UnexpectedStubMiss) | 736 V(UnexpectedStubMiss) |
737 | 737 |
738 #define FOR_EACH_HANDLER_COUNTER(V) \ | 738 #define FOR_EACH_HANDLER_COUNTER(V) \ |
739 V(IC_HandlerCacheHit) \ | 739 V(IC_HandlerCacheHit) \ |
740 V(KeyedLoadIC_LoadIndexedStringStub) \ | 740 V(KeyedLoadIC_LoadIndexedStringStub) \ |
741 V(KeyedLoadIC_LoadIndexedInterceptorStub) \ | 741 V(KeyedLoadIC_LoadIndexedInterceptorStub) \ |
742 V(KeyedLoadIC_KeyedLoadSloppyArgumentsStub) \ | 742 V(KeyedLoadIC_KeyedLoadSloppyArgumentsStub) \ |
743 V(KeyedLoadIC_LoadElementDH) \ | 743 V(KeyedLoadIC_LoadElementDH) \ |
744 V(KeyedLoadIC_LoadFastElementStub) \ | 744 V(KeyedLoadIC_LoadFastElementStub) \ |
745 V(KeyedLoadIC_LoadDictionaryElementStub) \ | 745 V(KeyedLoadIC_LoadDictionaryElementStub) \ |
746 V(KeyedLoadIC_SlowStub) \ | 746 V(KeyedLoadIC_SlowStub) \ |
747 V(KeyedStoreIC_KeyedStoreSloppyArgumentsStub) \ | 747 V(KeyedStoreIC_ElementsTransitionAndStoreStub) \ |
748 V(KeyedStoreIC_StoreFastElementStub) \ | 748 V(KeyedStoreIC_KeyedStoreSloppyArgumentsStub) \ |
749 V(KeyedStoreIC_StoreElementStub) \ | 749 V(KeyedStoreIC_SlowStub) \ |
750 V(KeyedStoreIC_Polymorphic) \ | 750 V(KeyedStoreIC_StoreFastElementStub) \ |
751 V(LoadIC_FunctionPrototypeStub) \ | 751 V(KeyedStoreIC_StoreElementStub) \ |
752 V(LoadIC_HandlerCacheHit_AccessCheck) \ | 752 V(LoadIC_FunctionPrototypeStub) \ |
753 V(LoadIC_HandlerCacheHit_Exotic) \ | 753 V(LoadIC_HandlerCacheHit_AccessCheck) \ |
754 V(LoadIC_HandlerCacheHit_Interceptor) \ | 754 V(LoadIC_HandlerCacheHit_Exotic) \ |
755 V(LoadIC_HandlerCacheHit_JSProxy) \ | 755 V(LoadIC_HandlerCacheHit_Interceptor) \ |
756 V(LoadIC_HandlerCacheHit_NonExistent) \ | 756 V(LoadIC_HandlerCacheHit_JSProxy) \ |
757 V(LoadIC_HandlerCacheHit_Accessor) \ | 757 V(LoadIC_HandlerCacheHit_NonExistent) \ |
758 V(LoadIC_HandlerCacheHit_Data) \ | 758 V(LoadIC_HandlerCacheHit_Accessor) \ |
759 V(LoadIC_HandlerCacheHit_Transition) \ | 759 V(LoadIC_HandlerCacheHit_Data) \ |
760 V(LoadIC_LoadApiGetterDH) \ | 760 V(LoadIC_HandlerCacheHit_Transition) \ |
761 V(LoadIC_LoadApiGetterFromPrototypeDH) \ | 761 V(LoadIC_LoadApiGetterDH) \ |
762 V(LoadIC_LoadApiGetterStub) \ | 762 V(LoadIC_LoadApiGetterFromPrototypeDH) \ |
763 V(LoadIC_LoadCallback) \ | 763 V(LoadIC_LoadApiGetterStub) \ |
764 V(LoadIC_LoadConstantDH) \ | 764 V(LoadIC_LoadCallback) \ |
765 V(LoadIC_LoadConstantFromPrototypeDH) \ | 765 V(LoadIC_LoadConstantDH) \ |
766 V(LoadIC_LoadConstant) \ | 766 V(LoadIC_LoadConstantFromPrototypeDH) \ |
767 V(LoadIC_LoadConstantStub) \ | 767 V(LoadIC_LoadConstant) \ |
768 V(LoadIC_LoadFieldDH) \ | 768 V(LoadIC_LoadConstantStub) \ |
769 V(LoadIC_LoadFieldFromPrototypeDH) \ | 769 V(LoadIC_LoadFieldDH) \ |
770 V(LoadIC_LoadField) \ | 770 V(LoadIC_LoadFieldFromPrototypeDH) \ |
771 V(LoadIC_LoadFieldStub) \ | 771 V(LoadIC_LoadField) \ |
772 V(LoadIC_LoadGlobal) \ | 772 V(LoadIC_LoadFieldStub) \ |
773 V(LoadIC_LoadInterceptor) \ | 773 V(LoadIC_LoadGlobal) \ |
774 V(LoadIC_LoadNonexistentDH) \ | 774 V(LoadIC_LoadInterceptor) \ |
775 V(LoadIC_LoadNonexistent) \ | 775 V(LoadIC_LoadNonexistentDH) \ |
776 V(LoadIC_LoadNormal) \ | 776 V(LoadIC_LoadNonexistent) \ |
777 V(LoadIC_LoadScriptContextFieldStub) \ | 777 V(LoadIC_LoadNormal) \ |
778 V(LoadIC_LoadViaGetter) \ | 778 V(LoadIC_LoadScriptContextFieldStub) \ |
779 V(LoadIC_Premonomorphic) \ | 779 V(LoadIC_LoadViaGetter) \ |
780 V(LoadIC_SlowStub) \ | 780 V(LoadIC_Premonomorphic) \ |
781 V(LoadIC_StringLengthStub) \ | 781 V(LoadIC_SlowStub) \ |
782 V(StoreIC_HandlerCacheHit_AccessCheck) \ | 782 V(LoadIC_StringLengthStub) \ |
783 V(StoreIC_HandlerCacheHit_Exotic) \ | 783 V(StoreIC_HandlerCacheHit_AccessCheck) \ |
784 V(StoreIC_HandlerCacheHit_Interceptor) \ | 784 V(StoreIC_HandlerCacheHit_Exotic) \ |
785 V(StoreIC_HandlerCacheHit_JSProxy) \ | 785 V(StoreIC_HandlerCacheHit_Interceptor) \ |
786 V(StoreIC_HandlerCacheHit_NonExistent) \ | 786 V(StoreIC_HandlerCacheHit_JSProxy) \ |
787 V(StoreIC_HandlerCacheHit_Accessor) \ | 787 V(StoreIC_HandlerCacheHit_NonExistent) \ |
788 V(StoreIC_HandlerCacheHit_Data) \ | 788 V(StoreIC_HandlerCacheHit_Accessor) \ |
789 V(StoreIC_HandlerCacheHit_Transition) \ | 789 V(StoreIC_HandlerCacheHit_Data) \ |
790 V(StoreIC_Premonomorphic) \ | 790 V(StoreIC_HandlerCacheHit_Transition) \ |
791 V(StoreIC_SlowStub) \ | 791 V(StoreIC_Premonomorphic) \ |
792 V(StoreIC_StoreCallback) \ | 792 V(StoreIC_SlowStub) \ |
793 V(StoreIC_StoreField) \ | 793 V(StoreIC_StoreCallback) \ |
794 V(StoreIC_StoreFieldDH) \ | 794 V(StoreIC_StoreField) \ |
795 V(StoreIC_StoreFieldStub) \ | 795 V(StoreIC_StoreFieldDH) \ |
796 V(StoreIC_StoreGlobal) \ | 796 V(StoreIC_StoreFieldStub) \ |
797 V(StoreIC_StoreGlobalTransition) \ | 797 V(StoreIC_StoreGlobal) \ |
798 V(StoreIC_StoreInterceptorStub) \ | 798 V(StoreIC_StoreGlobalTransition) \ |
799 V(StoreIC_StoreNormal) \ | 799 V(StoreIC_StoreInterceptorStub) \ |
800 V(StoreIC_StoreScriptContextFieldStub) \ | 800 V(StoreIC_StoreNormal) \ |
801 V(StoreIC_StoreTransition) \ | 801 V(StoreIC_StoreScriptContextFieldStub) \ |
| 802 V(StoreIC_StoreTransition) \ |
802 V(StoreIC_StoreViaSetter) | 803 V(StoreIC_StoreViaSetter) |
803 | 804 |
804 class RuntimeCallStats { | 805 class RuntimeCallStats { |
805 public: | 806 public: |
806 typedef RuntimeCallCounter RuntimeCallStats::*CounterId; | 807 typedef RuntimeCallCounter RuntimeCallStats::*CounterId; |
807 | 808 |
808 #define CALL_RUNTIME_COUNTER(name) \ | 809 #define CALL_RUNTIME_COUNTER(name) \ |
809 RuntimeCallCounter name = RuntimeCallCounter(#name); | 810 RuntimeCallCounter name = RuntimeCallCounter(#name); |
810 FOR_EACH_MANUAL_COUNTER(CALL_RUNTIME_COUNTER) | 811 FOR_EACH_MANUAL_COUNTER(CALL_RUNTIME_COUNTER) |
811 #undef CALL_RUNTIME_COUNTER | 812 #undef CALL_RUNTIME_COUNTER |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 } | 1311 } |
1311 | 1312 |
1312 Isolate* isolate_ = nullptr; | 1313 Isolate* isolate_ = nullptr; |
1313 RuntimeCallTimer timer_; | 1314 RuntimeCallTimer timer_; |
1314 }; | 1315 }; |
1315 | 1316 |
1316 } // namespace internal | 1317 } // namespace internal |
1317 } // namespace v8 | 1318 } // namespace v8 |
1318 | 1319 |
1319 #endif // V8_COUNTERS_H_ | 1320 #endif // V8_COUNTERS_H_ |
OLD | NEW |