#include "third_party/blink/renderer/bindings/core/v8/v8_metrics.h"
#include <cstdint>
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "services/metrics/public/cpp/metrics_utils.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "third_party/blink/renderer/bindings/core/v8/local_window_proxy.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/frame.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
namespace blink {
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::WasmModuleDecoded& event,
v8::metrics::Recorder::ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::WasmModuleCompiled& event,
v8::metrics::Recorder::ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::WasmModuleInstantiated& event,
v8::metrics::Recorder::ContextId context_id) { … }
namespace {
constexpr int32_t CappedSizeInKB(int64_t size_in_bytes) { … }
constexpr int32_t CappedEfficacyInKBPerMs(double efficacy_in_bytes_per_us) { … }
bool CheckCppEvents(const v8::metrics::GarbageCollectionFullCycle& event) { … }
void CheckUnifiedEvents(const v8::metrics::GarbageCollectionFullCycle& event) { … }
}
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::GarbageCollectionFullCycle& event,
ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::GarbageCollectionFullMainThreadIncrementalMark& event,
ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::GarbageCollectionFullMainThreadIncrementalSweep& event,
ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::GarbageCollectionFullMainThreadBatchedIncrementalMark&
event,
ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::GarbageCollectionFullMainThreadBatchedIncrementalSweep&
event,
ContextId context_id) { … }
void V8MetricsRecorder::AddMainThreadEvent(
const v8::metrics::GarbageCollectionYoungCycle& event,
ContextId context_id) { … }
void V8MetricsRecorder::NotifyIsolateDisposal() { … }
std::optional<V8MetricsRecorder::UkmRecorderAndSourceId>
V8MetricsRecorder::GetUkmRecorderAndSourceId(
v8::metrics::Recorder::ContextId context_id) { … }
}