#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_RUNTIME_CALL_STATS_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_RUNTIME_CALL_STATS_H_
#include <optional>
#include "base/check_op.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "third_party/blink/renderer/platform/bindings/buildflags.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
#include "v8/include/v8.h"
#if BUILDFLAG(RCS_COUNT_EVERYTHING)
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#endif
#if BUILDFLAG(BLINK_BINDINGS_TRACE_ENABLED)
#include "base/trace_event/trace_event.h"
#endif
namespace base {
class TickClock;
}
namespace WTF {
class String;
class StringBuilder;
}
namespace blink {
class TracedValue;
class PLATFORM_EXPORT RuntimeCallCounter { … };
class PLATFORM_EXPORT RuntimeCallTimer { … };
#define RUNTIME_CALL_STATS_ENTER_WITH_RCS(runtime_call_stats, timer, \
counterId) …
#define RUNTIME_CALL_STATS_LEAVE_WITH_RCS(runtime_call_stats, timer) …
#define RUNTIME_CALL_TIMER_SCOPE_WITH_RCS(runtime_call_stats, counterId) …
#define RUNTIME_CALL_TIMER_SCOPE_WITH_OPTIONAL_RCS( \
optional_scope_name, runtime_call_stats, counterId) …
#define RUNTIME_CALL_STATS_ENTER(isolate, timer, counterId) …
#define RUNTIME_CALL_STATS_LEAVE(isolate, timer) …
#define RUNTIME_CALL_TIMER_SCOPE(isolate, counterId) …
#define RUNTIME_CALL_TIMER_SCOPE_IF_ISOLATE_EXISTS(isolate, counterId) …
#if BUILDFLAG(RCS_COUNT_EVERYTHING)
#define RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT …
#else
#define RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(isolate, counterName) …
#endif
#if BUILDFLAG(BLINK_BINDINGS_TRACE_ENABLED)
#define BLINK_BINDINGS_TRACE_EVENT …
#else
#define BLINK_BINDINGS_TRACE_EVENT(trace_event_name) …
#endif
class PLATFORM_EXPORT RuntimeCallStats { … };
class PLATFORM_EXPORT RuntimeCallTimerScope { … };
class PLATFORM_EXPORT RuntimeCallStatsScopedTracer { … };
PLATFORM_EXPORT void LogRuntimeCallStats(v8::Isolate* isolate);
}
#endif