v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
counters-definitions.h
Go to the documentation of this file.
1// Copyright 2019 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_LOGGING_COUNTERS_DEFINITIONS_H_
6#define V8_LOGGING_COUNTERS_DEFINITIONS_H_
7
9
10namespace v8 {
11namespace internal {
12
13// Generic range histograms.
14// HR(name, caption, min, max, num_buckets)
15#define HISTOGRAM_RANGE_LIST(HR) \
16 HR(code_cache_reject_reason, V8.CodeCacheRejectReason, 1, 9, 9) \
17 HR(errors_thrown_per_context, V8.ErrorsThrownPerContext, 0, 200, 20) \
18 HR(incremental_marking_reason, V8.GCIncrementalMarkingReason, 0, \
19 kGarbageCollectionReasonMaxValue, kGarbageCollectionReasonMaxValue + 1) \
20 HR(incremental_marking_sum, V8.GCIncrementalMarkingSum, 0, 10000, 101) \
21 HR(mark_compact_reason, V8.GCMarkCompactReason, 0, \
22 kGarbageCollectionReasonMaxValue, kGarbageCollectionReasonMaxValue + 1) \
23 HR(gc_finalize_clear, V8.GCFinalizeMC.Clear, 0, 10000, 101) \
24 HR(gc_finalize_epilogue, V8.GCFinalizeMC.Epilogue, 0, 10000, 101) \
25 HR(gc_finalize_evacuate, V8.GCFinalizeMC.Evacuate, 0, 10000, 101) \
26 HR(gc_finalize_finish, V8.GCFinalizeMC.Finish, 0, 10000, 101) \
27 HR(gc_finalize_mark, V8.GCFinalizeMC.Mark, 0, 10000, 101) \
28 HR(gc_finalize_prologue, V8.GCFinalizeMC.Prologue, 0, 10000, 101) \
29 HR(gc_finalize_sweep, V8.GCFinalizeMC.Sweep, 0, 10000, 101) \
30 HR(gc_scavenger_scavenge_main, V8.GCScavenger.ScavengeMain, 0, 10000, 101) \
31 HR(gc_scavenger_scavenge_roots, V8.GCScavenger.ScavengeRoots, 0, 10000, 101) \
32 /* Asm/Wasm. */ \
33 HR(wasm_functions_per_asm_module, V8.WasmFunctionsPerModule.asm, 1, 1000000, \
34 51) \
35 HR(wasm_functions_per_wasm_module, V8.WasmFunctionsPerModule.wasm, 1, \
36 1000000, 51) \
37 HR(array_buffer_big_allocations, V8.ArrayBufferLargeAllocations, 0, 4096, \
38 13) \
39 HR(array_buffer_new_size_failures, V8.ArrayBufferNewSizeFailures, 0, 4096, \
40 13) \
41 HR(shared_array_allocations, V8.SharedArrayAllocationSizes, 0, 4096, 13) \
42 HR(wasm_asm_huge_function_size_bytes, V8.WasmHugeFunctionSizeBytes.asm, \
43 100 * KB, GB, 51) \
44 HR(wasm_wasm_huge_function_size_bytes, V8.WasmHugeFunctionSizeBytes.wasm, \
45 100 * KB, GB, 51) \
46 HR(wasm_asm_module_size_bytes, V8.WasmModuleSizeBytes.asm, 1, GB, 51) \
47 HR(wasm_wasm_module_size_bytes, V8.WasmModuleSizeBytes.wasm, 1, GB, 51) \
48 HR(wasm_compile_huge_function_peak_memory_bytes, \
49 V8.WasmCompileHugeFunctionPeakMemoryBytes, 1, GB, 51) \
50 HR(asm_module_size_bytes, V8.AsmModuleSizeBytes, 1, GB, 51) \
51 HR(compile_script_cache_behaviour, V8.CompileScript.CacheBehaviour, 0, 21, \
52 22) \
53 HR(wasm_memory_allocation_result, V8.WasmMemoryAllocationResult, 0, 3, 4) \
54 /* Committed code size per module, collected on GC. */ \
55 /* Older histogram, in MiB (0..1024MB). */ \
56 HR(wasm_module_code_size_mb, V8.WasmModuleCodeSizeMiB, 0, 1024, 64) \
57 /* Newer histogram, in KiB (0..100MB). */ \
58 HR(wasm_module_code_size_kb, V8.WasmModuleCodeSizeKiB, 0, 1024 * 100, 101) \
59 /* Metadata size per module, collected on GC. */ \
60 HR(wasm_module_metadata_size_kb, V8.WasmModuleMetadataSizeKiB, 0, \
61 1024 * 100, 101) \
62 /* Metadata of the whole Wasm engine, collected on GC. */ \
63 HR(wasm_engine_metadata_size_kb, V8.WasmEngineMetadataSizeKiB, 0, \
64 1024 * 100, 101) \
65 /* Percent of freed code size per module, collected on GC. */ \
66 HR(wasm_module_freed_code_size_percent, V8.WasmModuleCodeSizePercentFreed, \
67 0, 100, 32) \
68 /* Number of code GCs triggered per native module, collected on code GC. */ \
69 HR(wasm_module_num_triggered_code_gcs, \
70 V8.WasmModuleNumberOfCodeGCsTriggered, 1, 128, 20) \
71 /* The amount of executable Liftoff code flushed on emergency GCs for */ \
72 /* allocations and on memory pressure. */ \
73 HR(wasm_flushed_liftoff_code_size_bytes, V8.WasmFlushedLiftoffCodeSizeBytes, \
74 0, GB, 101) \
75 /* The size of flushed Liftoff meta data on emergency GCs for allocations */ \
76 /* and on memory pressure. */ \
77 HR(wasm_flushed_liftoff_metadata_size_bytes, \
78 V8.WasmFlushedLiftoffMetadataSizeBytes, 0, GB, 101) \
79 /* Number of code spaces reserved per wasm module. */ \
80 HR(wasm_module_num_code_spaces, V8.WasmModuleNumberOfCodeSpaces, 1, 128, 20) \
81 /* Number of deopts triggered in webassembly code. */ \
82 HR(wasm_deopts_executed, V8.WasmDeoptsExecutedCount, 0, 10000, 51) \
83 HR(wasm_deopts_per_function, V8.WasmDeoptsPerFunction, 0, 500, 21) \
84 /* Number of live modules per isolate. */ \
85 HR(wasm_modules_per_isolate, V8.WasmModulesPerIsolate, 1, 1024, 30) \
86 /* Number of live modules per engine (i.e. whole process). */ \
87 HR(wasm_modules_per_engine, V8.WasmModulesPerEngine, 1, 1024, 30) \
88 /* Bailout reason if Liftoff failed, or {kSuccess} (per function). */ \
89 HR(liftoff_bailout_reasons, V8.LiftoffBailoutReasons, 0, 20, 21) \
90 /* Support for PKEYs/PKU by testing result of pkey_alloc(). */ \
91 HR(wasm_memory_protection_keys_support, V8.WasmMemoryProtectionKeysSupport, \
92 0, 1, 2) \
93 /* Ticks observed in a single Turbofan compilation, in 1K. */ \
94 HR(turbofan_ticks, V8.TurboFan1KTicks, 0, 100000, 200) \
95 /* Backtracks observed in a single regexp interpreter execution. */ \
96 /* The maximum of 100M backtracks takes roughly 2 seconds on my machine. */ \
97 HR(regexp_backtracks, V8.RegExpBacktracks, 1, 100000000, 50) \
98 /* Number of times a cache event is triggered for a wasm module. */ \
99 HR(wasm_cache_count, V8.WasmCacheCount, 0, 100, 101) \
100 /* Number of in-use external pointers in the external pointer table. */ \
101 /* Counted after sweeping the table at the end of mark-compact GC. */ \
102 HR(external_pointers_count, V8.SandboxedExternalPointersCount, 0, \
103 kMaxExternalPointers, 101) \
104 HR(code_pointers_count, V8.SandboxedCodePointersCount, 0, kMaxCodePointers, \
105 101) \
106 HR(trusted_pointers_count, V8.SandboxedTrustedPointersCount, 0, \
107 kMaxTrustedPointers, 101) \
108 HR(cppheap_pointers_count, V8.SandboxedCppHeapPointersCount, 0, \
109 kMaxCppHeapPointers, 101) \
110 HR(js_dispatch_table_entries_count, V8.JSDispatchTableEntriesCount, 0, \
111 kMaxJSDispatchEntries, 101) \
112 /* Outcome of external pointer table compaction: kSuccess, */ \
113 /* kPartialSuccessor kAbortedDuringSweeping. See */ \
114 /* ExternalPointerTable::TableCompactionOutcome enum for more details. */ \
115 HR(external_pointer_table_compaction_outcome, \
116 V8.ExternalPointerTableCompactionOutcome, 0, 2, 3) \
117 HR(wasm_compilation_method, V8.WasmCompilationMethod, 0, 4, 5) \
118 HR(asmjs_instantiate_result, V8.AsmjsInstantiateResult, 0, 1, 2)
119
120#if V8_ENABLE_DRUMBRAKE
121#define HISTOGRAM_RANGE_LIST_SLOW(HR) \
122 /* Percentage (*1000) of time spent running Wasm jitted code. */ \
123 HR(wasm_jit_execution_ratio, V8.JitWasmExecutionPercentage, 0, 100000, 101) \
124 HR(wasm_jit_execution_too_slow, V8.JitWasmExecutionTooSlow, 0, 100000, 101) \
125 /* Percentage (*1000) of time spent running in the Wasm interpreter. */ \
126 HR(wasm_jitless_execution_ratio, V8.JitlessWasmExecutionPercentage, 0, \
127 100000, 101) \
128 HR(wasm_jitless_execution_too_slow, V8.JitlessWasmExecutionTooSlow, 0, \
129 100000, 101)
130#endif // V8_ENABLE_DRUMBRAKE
131
132// Like TIMED_HISTOGRAM_LIST, but allows the use of NestedTimedHistogramScope.
133// HT(name, caption, max, unit)
134#define NESTED_TIMED_HISTOGRAM_LIST(HT) \
135 /* Garbage collection timers. */ \
136 HT(gc_incremental_marking, V8.GCIncrementalMarking, 10000, MILLISECOND) \
137 HT(gc_incremental_marking_start, V8.GCIncrementalMarkingStart, 10000, \
138 MILLISECOND) \
139 HT(gc_minor_incremental_marking_start, V8.GCMinorIncrementalMarkingStart, \
140 10000, MILLISECOND) \
141 HT(gc_low_memory_notification, V8.GCLowMemoryNotification, 10000, \
142 MILLISECOND) \
143 /* Compilation times. */ \
144 HT(collect_source_positions, V8.CollectSourcePositions, 1000000, \
145 MICROSECOND) \
146 HT(compile, V8.CompileMicroSeconds, 1000000, MICROSECOND) \
147 HT(compile_eval, V8.CompileEvalMicroSeconds, 1000000, MICROSECOND) \
148 /* Serialization as part of compilation (code caching). */ \
149 HT(compile_serialize, V8.CompileSerializeMicroSeconds, 100000, MICROSECOND) \
150 HT(compile_deserialize, V8.CompileDeserializeMicroSeconds, 1000000, \
151 MICROSECOND) \
152 /* Snapshot. */ \
153 HT(snapshot_decompress, V8.SnapshotDecompressMicroSeconds, 1000000, \
154 MICROSECOND) \
155 HT(snapshot_deserialize_rospace, V8.SnapshotDeserializeRoSpaceMicroSeconds, \
156 1000000, MICROSECOND) \
157 HT(snapshot_deserialize_isolate, V8.SnapshotDeserializeIsolateMicroSeconds, \
158 1000000, MICROSECOND) \
159 HT(snapshot_deserialize_context, V8.SnapshotDeserializeContextMicroSeconds, \
160 1000000, MICROSECOND) \
161 /* ... and also see compile_deserialize above. */ \
162 /* Total compilation time incl. caching/parsing. */ \
163 HT(compile_script, V8.CompileScriptMicroSeconds, 1000000, MICROSECOND)
164
165#define NESTED_TIMED_HISTOGRAM_LIST_SLOW(HT) \
166 /* Total V8 time (including JS and runtime calls, exluding callbacks). */ \
167 HT(execute, V8.ExecuteMicroSeconds, 1000000, MICROSECOND)
168
169// Timer histograms, thread safe: HT(name, caption, max, unit)
170#define TIMED_HISTOGRAM_LIST(HT) \
171 /* Garbage collection timers. */ \
172 HT(gc_finalize_incremental_regular, \
173 V8.GC.Event.MainThread.Full.Finalize.Incremental.Regular, 10000, \
174 MILLISECOND) \
175 HT(gc_finalize_incremental_regular_foreground, \
176 V8.GC.Event.MainThread.Full.Finalize.Incremental.Regular.Foreground, \
177 10000, MILLISECOND) \
178 HT(gc_finalize_incremental_regular_background, \
179 V8.GC.Event.MainThread.Full.Finalize.Incremental.Regular.Background, \
180 10000, MILLISECOND) \
181 HT(gc_finalize_incremental_memory_reducing, \
182 V8.GC.Event.MainThread.Full.Finalize.Incremental.ReduceMemory, 10000, \
183 MILLISECOND) \
184 HT(gc_finalize_incremental_memory_reducing_foreground, \
185 V8.GC.Event.MainThread.Full.Finalize.Incremental.ReduceMemory.Foreground, \
186 10000, MILLISECOND) \
187 HT(gc_finalize_incremental_memory_reducing_background, \
188 V8.GC.Event.MainThread.Full.Finalize.Incremental.ReduceMemory.Background, \
189 10000, MILLISECOND) \
190 HT(gc_finalize_incremental_memory_measure, \
191 V8.GC.Event.MainThread.Full.Finalize.Incremental.MeasureMemory, 10000, \
192 MILLISECOND) \
193 HT(gc_finalize_incremental_memory_measure_foreground, \
194 V8.GC.Event.MainThread.Full.Finalize.Incremental.MeasureMemory \
195 .Foreground, \
196 10000, MILLISECOND) \
197 HT(gc_finalize_incremental_memory_measure_background, \
198 V8.GC.Event.MainThread.Full.Finalize.Incremental.MeasureMemory \
199 .Background, \
200 10000, MILLISECOND) \
201 HT(gc_finalize_non_incremental_regular, \
202 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.Regular, 10000, \
203 MILLISECOND) \
204 HT(gc_finalize_non_incremental_regular_foreground, \
205 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.Regular.Foreground, \
206 10000, MILLISECOND) \
207 HT(gc_finalize_non_incremental_regular_background, \
208 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.Regular.Background, \
209 10000, MILLISECOND) \
210 HT(gc_finalize_non_incremental_memory_reducing, \
211 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.ReduceMemory, 10000, \
212 MILLISECOND) \
213 HT(gc_finalize_non_incremental_memory_reducing_foreground, \
214 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.ReduceMemory \
215 .Foreground, \
216 10000, MILLISECOND) \
217 HT(gc_finalize_non_incremental_memory_reducing_background, \
218 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.ReduceMemory \
219 .Background, \
220 10000, MILLISECOND) \
221 HT(gc_finalize_non_incremental_memory_measure, \
222 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.MeasureMemory, 10000, \
223 MILLISECOND) \
224 HT(gc_finalize_non_incremental_memory_measure_foreground, \
225 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.MeasureMemory \
226 .Foreground, \
227 10000, MILLISECOND) \
228 HT(gc_finalize_non_incremental_memory_measure_background, \
229 V8.GC.Event.MainThread.Full.Finalize.NonIncremental.MeasureMemory \
230 .Background, \
231 10000, MILLISECOND) \
232 HT(measure_memory_delay_ms, V8.MeasureMemoryDelayMilliseconds, 100000, \
233 MILLISECOND) \
234 HT(gc_time_to_global_safepoint, V8.GC.TimeToGlobalSafepoint, 10000000, \
235 MICROSECOND) \
236 HT(gc_time_to_safepoint, V8.GC.TimeToSafepoint, 10000000, MICROSECOND) \
237 HT(gc_time_to_collection_on_background, V8.GC.TimeToCollectionOnBackground, \
238 10000000, MICROSECOND) \
239 /* Maglev timers. */ \
240 HT(maglev_optimize_prepare, V8.MaglevOptimizePrepare, 100000, MICROSECOND) \
241 HT(maglev_optimize_execute, V8.MaglevOptimizeExecute, 100000, MICROSECOND) \
242 HT(maglev_optimize_finalize, V8.MaglevOptimizeFinalize, 100000, MICROSECOND) \
243 HT(maglev_optimize_total_time, V8.MaglevOptimizeTotalTime, 1000000, \
244 MICROSECOND) \
245 /* TurboFan timers. */ \
246 HT(turbofan_optimize_prepare, V8.TurboFanOptimizePrepare, 1000000, \
247 MICROSECOND) \
248 HT(turbofan_optimize_execute, V8.TurboFanOptimizeExecute, 1000000, \
249 MICROSECOND) \
250 HT(turbofan_optimize_finalize, V8.TurboFanOptimizeFinalize, 1000000, \
251 MICROSECOND) \
252 HT(turbofan_optimize_total_foreground, V8.TurboFanOptimizeTotalForeground, \
253 10000000, MICROSECOND) \
254 HT(turbofan_optimize_total_background, V8.TurboFanOptimizeTotalBackground, \
255 10000000, MICROSECOND) \
256 HT(turbofan_optimize_total_time, V8.TurboFanOptimizeTotalTime, 10000000, \
257 MICROSECOND) \
258 HT(turbofan_optimize_non_concurrent_total_time, \
259 V8.TurboFanOptimizeNonConcurrentTotalTime, 10000000, MICROSECOND) \
260 HT(turbofan_optimize_concurrent_total_time, \
261 V8.TurboFanOptimizeConcurrentTotalTime, 10000000, MICROSECOND) \
262 HT(turbofan_osr_prepare, V8.TurboFanOptimizeForOnStackReplacementPrepare, \
263 1000000, MICROSECOND) \
264 HT(turbofan_osr_execute, V8.TurboFanOptimizeForOnStackReplacementExecute, \
265 1000000, MICROSECOND) \
266 HT(turbofan_osr_finalize, V8.TurboFanOptimizeForOnStackReplacementFinalize, \
267 1000000, MICROSECOND) \
268 HT(turbofan_osr_total_time, \
269 V8.TurboFanOptimizeForOnStackReplacementTotalTime, 10000000, MICROSECOND) \
270 /* Wasm timers. */ \
271 HT(wasm_compile_asm_module_time, V8.WasmCompileModuleMicroSeconds.asm, \
272 10000000, MICROSECOND) \
273 HT(wasm_compile_wasm_module_time, V8.WasmCompileModuleMicroSeconds.wasm, \
274 10000000, MICROSECOND) \
275 HT(wasm_async_compile_wasm_module_time, \
276 V8.WasmCompileModuleAsyncMicroSeconds, 100000000, MICROSECOND) \
277 HT(wasm_streaming_compile_wasm_module_time, \
278 V8.WasmCompileModuleStreamingMicroSeconds, 100000000, MICROSECOND) \
279 HT(wasm_streaming_finish_wasm_module_time, \
280 V8.WasmFinishModuleStreamingMicroSeconds, 100000000, MICROSECOND) \
281 HT(wasm_deserialization_time, V8.WasmDeserializationTimeMilliSeconds, 10000, \
282 MILLISECOND) \
283 HT(wasm_compile_asm_function_time, V8.WasmCompileFunctionMicroSeconds.asm, \
284 1000000, MICROSECOND) \
285 HT(wasm_compile_wasm_function_time, V8.WasmCompileFunctionMicroSeconds.wasm, \
286 1000000, MICROSECOND) \
287 HT(wasm_compile_huge_function_time, V8.WasmCompileHugeFunctionMilliSeconds, \
288 100000, MILLISECOND) \
289 HT(wasm_instantiate_wasm_module_time, \
290 V8.WasmInstantiateModuleMicroSeconds.wasm, 10000000, MICROSECOND) \
291 HT(wasm_instantiate_asm_module_time, \
292 V8.WasmInstantiateModuleMicroSeconds.asm, 10000000, MICROSECOND) \
293 HT(wasm_lazy_compile_time, V8.WasmLazyCompileTimeMicroSeconds, 100000000, \
294 MICROSECOND) \
295 HT(wasm_compile_after_deserialize, \
296 V8.WasmCompileAfterDeserializeMilliSeconds, 1000000, MILLISECOND) \
297 /* Total compilation time incl. caching/parsing for various cache states. */ \
298 HT(compile_script_with_produce_cache, \
299 V8.CompileScriptMicroSeconds.ProduceCache, 1000000, MICROSECOND) \
300 HT(compile_script_with_isolate_cache_hit, \
301 V8.CompileScriptMicroSeconds.IsolateCacheHit, 1000000, MICROSECOND) \
302 HT(compile_script_with_consume_cache, \
303 V8.CompileScriptMicroSeconds.ConsumeCache, 1000000, MICROSECOND) \
304 HT(compile_script_consume_failed, \
305 V8.CompileScriptMicroSeconds.ConsumeCache.Failed, 1000000, MICROSECOND) \
306 HT(compile_script_no_cache_other, \
307 V8.CompileScriptMicroSeconds.NoCache.Other, 1000000, MICROSECOND) \
308 HT(compile_script_no_cache_because_inline_script, \
309 V8.CompileScriptMicroSeconds.NoCache.InlineScript, 1000000, MICROSECOND) \
310 HT(compile_script_no_cache_because_script_too_small, \
311 V8.CompileScriptMicroSeconds.NoCache.ScriptTooSmall, 1000000, \
312 MICROSECOND) \
313 HT(compile_script_no_cache_because_cache_too_cold, \
314 V8.CompileScriptMicroSeconds.NoCache.CacheTooCold, 1000000, MICROSECOND) \
315 HT(compile_script_streaming_finalization, \
316 V8.CompileScriptMicroSeconds.StreamingFinalization, 1000000, MICROSECOND) \
317 HT(compile_script_on_background, \
318 V8.CompileScriptMicroSeconds.BackgroundThread, 1000000, MICROSECOND) \
319 HT(compile_function_on_background, \
320 V8.CompileFunctionMicroSeconds.BackgroundThread, 1000000, MICROSECOND) \
321 HT(deserialize_script_on_background, \
322 V8.CompileScriptMicroSeconds.ConsumeCache.BackgroundThread, 1000000, \
323 MICROSECOND) \
324 /* Debugger timers. */ \
325 HT(debug_pause_to_paused_event, V8.DebugPauseToPausedEventMilliSeconds, \
326 1000000, MILLISECOND)
327
328#define AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT) \
329 AHT(compile_lazy, V8.CompileLazyMicroSeconds)
330
331#define HISTOGRAM_PERCENTAGE_LIST(HP) \
332 /* Heap fragmentation. */ \
333 HP(external_fragmentation_total, V8.MemoryExternalFragmentationTotal) \
334 HP(external_fragmentation_old_space, V8.MemoryExternalFragmentationOldSpace) \
335 HP(external_fragmentation_code_space, \
336 V8.MemoryExternalFragmentationCodeSpace) \
337 HP(external_fragmentation_map_space, V8.MemoryExternalFragmentationMapSpace) \
338 HP(external_fragmentation_lo_space, V8.MemoryExternalFragmentationLoSpace)
339
340// Note: These use Histogram with options (min=1000, max=500000, buckets=50).
341#define HISTOGRAM_LEGACY_MEMORY_LIST(HM) \
342 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \
343 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \
344 HM(heap_sample_map_space_committed, V8.MemoryHeapSampleMapSpaceCommitted) \
345 HM(heap_sample_code_space_committed, V8.MemoryHeapSampleCodeSpaceCommitted) \
346 HM(heap_sample_maximum_committed, V8.MemoryHeapSampleMaximumCommitted)
347
348#define STATS_COUNTER_LIST(SC) \
349 /* Global handle count. */ \
350 SC(global_handles, V8.GlobalHandles) \
351 SC(alive_after_last_gc, V8.AliveAfterLastGC) \
352 SC(compilation_cache_hits, V8.CompilationCacheHits) \
353 SC(compilation_cache_misses, V8.CompilationCacheMisses) \
354 /* Number of times the cache contained a reusable Script but not */ \
355 /* the root SharedFunctionInfo. */ \
356 SC(compilation_cache_partial_hits, V8.CompilationCachePartialHits) \
357 SC(objs_since_last_young, V8.ObjsSinceLastYoung) \
358 SC(objs_since_last_full, V8.ObjsSinceLastFull) \
359 SC(gc_compactor_caused_by_request, V8.GCCompactorCausedByRequest) \
360 SC(gc_compactor_caused_by_promoted_data, V8.GCCompactorCausedByPromotedData) \
361 SC(gc_compactor_caused_by_oldspace_exhaustion, \
362 V8.GCCompactorCausedByOldspaceExhaustion) \
363 SC(enum_cache_hits, V8.EnumCacheHits) \
364 SC(enum_cache_misses, V8.EnumCacheMisses) \
365 SC(maps_created, V8.MapsCreated) \
366 SC(megamorphic_stub_cache_updates, V8.MegamorphicStubCacheUpdates) \
367 SC(regexp_entry_runtime, V8.RegExpEntryRuntime) \
368 SC(stack_interrupts, V8.StackInterrupts) \
369 SC(new_space_bytes_available, V8.MemoryNewSpaceBytesAvailable) \
370 SC(new_space_bytes_committed, V8.MemoryNewSpaceBytesCommitted) \
371 SC(new_space_bytes_used, V8.MemoryNewSpaceBytesUsed) \
372 SC(old_space_bytes_available, V8.MemoryOldSpaceBytesAvailable) \
373 SC(old_space_bytes_committed, V8.MemoryOldSpaceBytesCommitted) \
374 SC(old_space_bytes_used, V8.MemoryOldSpaceBytesUsed) \
375 SC(code_space_bytes_available, V8.MemoryCodeSpaceBytesAvailable) \
376 SC(code_space_bytes_committed, V8.MemoryCodeSpaceBytesCommitted) \
377 SC(code_space_bytes_used, V8.MemoryCodeSpaceBytesUsed) \
378 SC(map_space_bytes_available, V8.MemoryMapSpaceBytesAvailable) \
379 SC(map_space_bytes_committed, V8.MemoryMapSpaceBytesCommitted) \
380 SC(map_space_bytes_used, V8.MemoryMapSpaceBytesUsed) \
381 SC(lo_space_bytes_available, V8.MemoryLoSpaceBytesAvailable) \
382 SC(lo_space_bytes_committed, V8.MemoryLoSpaceBytesCommitted) \
383 SC(lo_space_bytes_used, V8.MemoryLoSpaceBytesUsed) \
384 SC(wasm_generated_code_size, V8.WasmGeneratedCodeBytes) \
385 SC(wasm_reloc_size, V8.WasmRelocBytes) \
386 SC(wasm_deopt_data_size, V8.WasmDeoptDataBytes) \
387 SC(wasm_lazily_compiled_functions, V8.WasmLazilyCompiledFunctions) \
388 SC(wasm_compiled_export_wrapper, V8.WasmCompiledExportWrappers)
389
390// List of counters that can be incremented from generated code. We need them in
391// a separate list to be able to relocate them.
392#define STATS_COUNTER_NATIVE_CODE_LIST(SC) \
393 /* Number of write barriers executed at runtime. */ \
394 SC(write_barriers, V8.WriteBarriers) \
395 SC(regexp_entry_native, V8.RegExpEntryNative) \
396 SC(megamorphic_stub_cache_probes, V8.MegamorphicStubCacheProbes) \
397 SC(megamorphic_stub_cache_misses, V8.MegamorphicStubCacheMisses)
398
399} // namespace internal
400} // namespace v8
401
402#endif // V8_LOGGING_COUNTERS_DEFINITIONS_H_