#ifndef V8_LOGGING_RUNTIME_CALL_STATS_H_
#define V8_LOGGING_RUNTIME_CALL_STATS_H_
#include <optional>
#include "src/base/macros.h"
#ifdef V8_RUNTIME_CALL_STATS
#include "src/base/atomic-utils.h"
#include "src/base/platform/platform.h"
#include "src/base/platform/time.h"
#include "src/builtins/builtins-definitions.h"
#include "src/execution/thread-id.h"
#include "src/init/heap-symbols.h"
#include "src/logging/tracing-flags.h"
#include "src/runtime/runtime.h"
#include "src/tracing/traced-value.h"
#include "src/tracing/tracing-category-observer.h"
#endif
namespace v8 {
namespace internal {
#ifdef V8_RUNTIME_CALL_STATS
class RuntimeCallCounter final { … };
class RuntimeCallTimer final { … };
#define FOR_EACH_GC_COUNTER(V) …
#define FOR_EACH_API_COUNTER(V) …
#define ADD_THREAD_SPECIFIC_COUNTER(V, Prefix, Suffix) …
#define FOR_EACH_THREAD_SPECIFIC_COUNTER(V) …
#define FOR_EACH_MANUAL_COUNTER(V) …
#define FOR_EACH_HANDLER_COUNTER(V) …
enum RuntimeCallCounterId { … };
class RuntimeCallStats final { … };
class WorkerThreadRuntimeCallStats final { … };
class V8_EXPORT_PRIVATE V8_NODISCARD WorkerThreadRuntimeCallStatsScope final { … };
#define CHANGE_CURRENT_RUNTIME_COUNTER(runtime_call_stats, counter_id) …
#define TRACE_HANDLER_STATS(isolate, counter_name) …
class V8_NODISCARD RuntimeCallTimerScope { … };
#else
#define TRACE_HANDLER_STATS …
#define CHANGE_CURRENT_RUNTIME_COUNTER …
class WorkerThreadRuntimeCallStats {};
class RuntimeCallStats {
public:
enum ThreadType { kMainIsolateThread, kWorkerThread };
explicit V8_EXPORT_PRIVATE RuntimeCallStats(ThreadType thread_type) {}
};
class WorkerThreadRuntimeCallStatsScope {
public:
explicit WorkerThreadRuntimeCallStatsScope(
WorkerThreadRuntimeCallStats* off_thread_stats) {}
RuntimeCallStats* Get() const { return nullptr; }
};
#endif
}
}
#endif