#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_TRACING_HELPER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_TRACING_HELPER_H_
#include <string>
#include "base/compiler_specific.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "third_party/blink/public/platform/task_type.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/hash_set.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/perfetto/include/perfetto/tracing/event_context.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/perfetto/include/perfetto/tracing/track.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/track_event.pbzero.h"
namespace blink {
namespace scheduler {
enum class TracingCategory { … };
namespace internal {
constexpr const char* TracingCategoryToString(TracingCategory category) { … }
}
PLATFORM_EXPORT double TimeDeltaToMilliseconds(const base::TimeDelta& value);
PLATFORM_EXPORT const char* YesNoStateToString(bool is_yes);
PLATFORM_EXPORT
perfetto::protos::pbzero::RendererMainThreadTaskExecution::TaskType
TaskTypeToProto(TaskType task_type);
class TraceableVariable;
class PLATFORM_EXPORT TraceableVariableController { … };
class TraceableVariable { … };
template <TracingCategory category>
class StateTracer { … };
template <typename T, TracingCategory category>
class TraceableState : public TraceableVariable, private StateTracer<category> { … };
template <TracingCategory category, typename TypedValue>
class ProtoStateTracer { … };
InitializeProtoFuncPtr;
template <typename T, TracingCategory category>
class TraceableObjectState
: public TraceableVariable,
public ProtoStateTracer<category, TraceableObjectState<T, category>> { … };
template <typename T, TracingCategory category>
class TraceableCounter : public TraceableVariable { … };
template <typename T, TracingCategory category>
constexpr T operator-(const TraceableCounter<T, category>& counter) { … }
template <typename T, TracingCategory category>
constexpr T operator/(const TraceableCounter<T, category>& lhs, const T& rhs) { … }
template <typename T, TracingCategory category>
constexpr bool operator>(const TraceableCounter<T, category>& lhs,
const T& rhs) { … }
template <typename T, TracingCategory category>
constexpr bool operator<(const TraceableCounter<T, category>& lhs,
const T& rhs) { … }
template <typename T, TracingCategory category>
constexpr bool operator!=(const TraceableCounter<T, category>& lhs,
const T& rhs) { … }
template <typename T, TracingCategory category>
constexpr T operator++(TraceableCounter<T, category>& counter) { … }
template <typename T, TracingCategory category>
constexpr T operator--(TraceableCounter<T, category>& counter) { … }
template <typename T, TracingCategory category>
constexpr T operator++(TraceableCounter<T, category>& counter, int) { … }
template <typename T, TracingCategory category>
constexpr T operator--(TraceableCounter<T, category>& counter, int) { … }
}
}
#endif