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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 V8_INLINE void Initialize(RuntimeCallStats* stats, | 903 V8_INLINE void Initialize(RuntimeCallStats* stats, |
904 RuntimeCallStats::CounterId counter_id) { | 904 RuntimeCallStats::CounterId counter_id) { |
905 stats_ = stats; | 905 stats_ = stats; |
906 RuntimeCallStats::Enter(stats_, &timer_, counter_id); | 906 RuntimeCallStats::Enter(stats_, &timer_, counter_id); |
907 } | 907 } |
908 | 908 |
909 RuntimeCallStats* stats_ = nullptr; | 909 RuntimeCallStats* stats_ = nullptr; |
910 RuntimeCallTimer timer_; | 910 RuntimeCallTimer timer_; |
911 }; | 911 }; |
912 | 912 |
913 #define HISTOGRAM_RANGE_LIST(HR) \ | 913 #define HISTOGRAM_RANGE_LIST(HR) \ |
914 /* Generic range histograms */ \ | 914 /* Generic range histograms */ \ |
915 HR(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \ | 915 HR(detached_context_age_in_gc, V8.DetachedContextAgeInGC, 0, 20, 21) \ |
916 HR(gc_idle_time_allotted_in_ms, V8.GCIdleTimeAllottedInMS, 0, 10000, 101) \ | 916 HR(gc_idle_time_allotted_in_ms, V8.GCIdleTimeAllottedInMS, 0, 10000, 101) \ |
917 HR(gc_idle_time_limit_overshot, V8.GCIdleTimeLimit.Overshot, 0, 10000, 101) \ | 917 HR(gc_idle_time_limit_overshot, V8.GCIdleTimeLimit.Overshot, 0, 10000, 101) \ |
918 HR(gc_idle_time_limit_undershot, V8.GCIdleTimeLimit.Undershot, 0, 10000, \ | 918 HR(gc_idle_time_limit_undershot, V8.GCIdleTimeLimit.Undershot, 0, 10000, \ |
919 101) \ | 919 101) \ |
920 HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ | 920 HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 6, 6) \ |
921 HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ | 921 HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \ |
922 HR(debug_feature_usage, V8.DebugFeatureUsage, 1, 7, 7) \ | 922 HR(debug_feature_usage, V8.DebugFeatureUsage, 1, 7, 7) \ |
923 HR(incremental_marking_reason, V8.GCIncrementalMarkingReason, 0, 21, 22) \ | 923 HR(incremental_marking_reason, V8.GCIncrementalMarkingReason, 0, 21, 22) \ |
924 HR(mark_compact_reason, V8.GCMarkCompactReason, 0, 21, 22) \ | 924 HR(mark_compact_reason, V8.GCMarkCompactReason, 0, 21, 22) \ |
925 HR(scavenge_reason, V8.GCScavengeReason, 0, 21, 22) \ | 925 HR(scavenge_reason, V8.GCScavengeReason, 0, 21, 22) \ |
926 HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \ | 926 HR(young_generation_handling, V8.GCYoungGenerationHandling, 0, 2, 3) \ |
927 /* Asm/Wasm. */ \ | 927 /* Asm/Wasm. */ \ |
928 HR(wasm_functions_per_asm_module, V8.WasmFunctionsPerModule.asm, 1, 10000, \ | 928 HR(wasm_functions_per_asm_module, V8.WasmFunctionsPerModule.asm, 1, 100000, \ |
929 51) \ | 929 51) \ |
930 HR(wasm_functions_per_wasm_module, V8.WasmFunctionsPerModule.wasm, 1, 10000, \ | 930 HR(wasm_functions_per_wasm_module, V8.WasmFunctionsPerModule.wasm, 1, \ |
931 51) | 931 100000, 51) |
932 | 932 |
933 #define HISTOGRAM_TIMER_LIST(HT) \ | 933 #define HISTOGRAM_TIMER_LIST(HT) \ |
934 /* Garbage collection timers. */ \ | 934 /* Garbage collection timers. */ \ |
935 HT(gc_compactor, V8.GCCompactor, 10000, MILLISECOND) \ | 935 HT(gc_compactor, V8.GCCompactor, 10000, MILLISECOND) \ |
936 HT(gc_finalize, V8.GCFinalizeMC, 10000, MILLISECOND) \ | 936 HT(gc_finalize, V8.GCFinalizeMC, 10000, MILLISECOND) \ |
937 HT(gc_finalize_reduce_memory, V8.GCFinalizeMCReduceMemory, 10000, \ | 937 HT(gc_finalize_reduce_memory, V8.GCFinalizeMCReduceMemory, 10000, \ |
938 MILLISECOND) \ | 938 MILLISECOND) \ |
939 HT(gc_scavenger, V8.GCScavenger, 10000, MILLISECOND) \ | 939 HT(gc_scavenger, V8.GCScavenger, 10000, MILLISECOND) \ |
940 HT(gc_context, V8.GCContext, 10000, \ | 940 HT(gc_context, V8.GCContext, 10000, \ |
941 MILLISECOND) /* GC context cleanup time */ \ | 941 MILLISECOND) /* GC context cleanup time */ \ |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 | 1336 |
1337 explicit Counters(Isolate* isolate); | 1337 explicit Counters(Isolate* isolate); |
1338 | 1338 |
1339 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 1339 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
1340 }; | 1340 }; |
1341 | 1341 |
1342 } // namespace internal | 1342 } // namespace internal |
1343 } // namespace v8 | 1343 } // namespace v8 |
1344 | 1344 |
1345 #endif // V8_COUNTERS_H_ | 1345 #endif // V8_COUNTERS_H_ |
OLD | NEW |