69template <
typename EventType>
88#if defined(CPPGC_YOUNG_GENERATION)
92 double collection_rate_cpp_in_percent = -1.0;
93 double efficiency_cpp_in_bytes_per_us = -1.0;
94 double main_thread_efficiency_cpp_in_bytes_per_us = -1.0;
139#define V8_MAIN_THREAD_METRICS_EVENTS(V) \
140 V(GarbageCollectionFullCycle) \
141 V(GarbageCollectionFullMainThreadIncrementalMark) \
142 V(GarbageCollectionFullMainThreadBatchedIncrementalMark) \
143 V(GarbageCollectionFullMainThreadIncrementalSweep) \
144 V(GarbageCollectionFullMainThreadBatchedIncrementalSweep) \
145 V(GarbageCollectionYoungCycle) \
146 V(WasmModuleDecoded) \
147 V(WasmModuleCompiled) \
148 V(WasmModuleInstantiated) \
149 V(WasmModuleTieredUp)
151#define V8_THREAD_SAFE_METRICS_EVENTS(V) V(WasmModulesPerIsolate)
187 bool IsEmpty()
const {
return id_ == kEmptyId; }
194 friend class ::v8::Context;
195 friend class ::v8::internal::Isolate;
197 explicit ContextId(uintptr_t
id) : id_(id) {}
199 static constexpr uintptr_t kEmptyId = 0;
205#define ADD_MAIN_THREAD_EVENT(E) \
206 virtual void AddMainThreadEvent(const E& event, ContextId context_id) {}
208#undef ADD_MAIN_THREAD_EVENT
210#define ADD_THREAD_SAFE_EVENT(E) \
211 virtual void AddThreadSafeEvent(const E& event) {}
213#undef ADD_THREAD_SAFE_EVENT
245 int64_t gc_full_atomic_wall_clock_duration_us = 0;
246 int64_t gc_full_incremental_wall_clock_duration_us = 0;
247 int64_t gc_young_wall_clock_duration_us = 0;
249 int64_t v8_execute_us = 0;
static V8_INLINE void IncrementLongTasksStatsCounter(v8::Isolate *isolate)
static const ContextId Empty()
bool operator!=(const ContextId &other) const
bool operator==(const ContextId &other) const
virtual ~Recorder()=default
static MaybeLocal< Context > GetContext(Isolate *isolate, ContextId id)
static ContextId GetContextId(Local< Context > context)
virtual void NotifyIsolateDisposal()
std::vector< EventType > events
double efficiency_in_bytes_per_us
GarbageCollectionSizes objects
GarbageCollectionPhases main_thread_incremental
GarbageCollectionPhases main_thread_atomic_cpp
GarbageCollectionPhases total
GarbageCollectionPhases main_thread
double collection_rate_cpp_in_percent
GarbageCollectionPhases main_thread_incremental_cpp
GarbageCollectionPhases main_thread_cpp
GarbageCollectionSizes memory_cpp
double main_thread_efficiency_in_bytes_per_us
GarbageCollectionPhases total_cpp
GarbageCollectionPhases main_thread_atomic
double efficiency_cpp_in_bytes_per_us
double main_thread_efficiency_cpp_in_bytes_per_us
GarbageCollectionSizes objects_cpp
double collection_rate_in_percent
GarbageCollectionSizes memory
int64_t cpp_wall_clock_duration_in_us
int64_t wall_clock_duration_in_us
int64_t cpp_wall_clock_duration_in_us
int64_t wall_clock_duration_in_us
int64_t weak_wall_clock_duration_in_us
int64_t total_wall_clock_duration_in_us
int64_t sweep_wall_clock_duration_in_us
int64_t mark_wall_clock_duration_in_us
int64_t compact_wall_clock_duration_in_us
int64_t total_wall_clock_duration_in_us
double efficiency_in_bytes_per_us
int64_t main_thread_wall_clock_duration_in_us
double main_thread_efficiency_in_bytes_per_us
double collection_rate_in_percent
static V8_INLINE void Reset(Isolate *isolate)
static LongTaskStats Get(Isolate *isolate)
size_t liftoff_bailout_count
size_t code_size_in_bytes
int64_t wall_clock_duration_in_us
int64_t cpu_duration_in_us
size_t module_size_in_bytes
int64_t wall_clock_duration_in_us
int64_t cpu_duration_in_us
size_t imported_function_count
int64_t wall_clock_duration_in_us
size_t code_size_in_bytes
int64_t wall_clock_duration_in_us
int64_t cpu_duration_in_us
#define V8_MAIN_THREAD_METRICS_EVENTS(V)
#define ADD_MAIN_THREAD_EVENT(E)
#define V8_THREAD_SAFE_METRICS_EVENTS(V)
#define ADD_THREAD_SAFE_EVENT(E)