#ifndef INCLUDE_PERFETTO_TRACING_INTERNAL_TRACK_EVENT_LEGACY_H_
#define INCLUDE_PERFETTO_TRACING_INTERNAL_TRACK_EVENT_LEGACY_H_
#include "perfetto/base/build_config.h"
#include "perfetto/tracing/event_context.h"
#include "perfetto/tracing/track.h"
#include "protos/perfetto/trace/track_event/track_event.pbzero.h"
#ifndef PERFETTO_ENABLE_LEGACY_TRACE_EVENTS
#define PERFETTO_ENABLE_LEGACY_TRACE_EVENTS …
#endif
namespace perfetto {
namespace legacy {
enum TraceEventFlag { … };
enum PerfettoLegacyCurrentThreadId { … };
template <typename T>
ThreadTrack ConvertThreadId(const T&);
template <>
ThreadTrack PERFETTO_EXPORT_COMPONENT
ConvertThreadId(const PerfettoLegacyCurrentThreadId&);
}
}
#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS
static constexpr char TRACE_EVENT_PHASE_BEGIN = …;
static constexpr char TRACE_EVENT_PHASE_END = …;
static constexpr char TRACE_EVENT_PHASE_COMPLETE = …;
static constexpr char TRACE_EVENT_PHASE_INSTANT = …;
static constexpr char TRACE_EVENT_PHASE_ASYNC_BEGIN = …;
static constexpr char TRACE_EVENT_PHASE_ASYNC_STEP_INTO = …;
static constexpr char TRACE_EVENT_PHASE_ASYNC_STEP_PAST = …;
static constexpr char TRACE_EVENT_PHASE_ASYNC_END = …;
static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN = …;
static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_END = …;
static constexpr char TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT = …;
static constexpr char TRACE_EVENT_PHASE_FLOW_BEGIN = …;
static constexpr char TRACE_EVENT_PHASE_FLOW_STEP = …;
static constexpr char TRACE_EVENT_PHASE_FLOW_END = …;
static constexpr char TRACE_EVENT_PHASE_METADATA = …;
static constexpr char TRACE_EVENT_PHASE_COUNTER = …;
static constexpr char TRACE_EVENT_PHASE_SAMPLE = …;
static constexpr char TRACE_EVENT_PHASE_CREATE_OBJECT = …;
static constexpr char TRACE_EVENT_PHASE_SNAPSHOT_OBJECT = …;
static constexpr char TRACE_EVENT_PHASE_DELETE_OBJECT = …;
static constexpr char TRACE_EVENT_PHASE_MEMORY_DUMP = …;
static constexpr char TRACE_EVENT_PHASE_MARK = …;
static constexpr char TRACE_EVENT_PHASE_CLOCK_SYNC = …;
static constexpr uint32_t TRACE_EVENT_FLAG_NONE = …;
static constexpr uint32_t TRACE_EVENT_FLAG_COPY = …;
static constexpr uint32_t TRACE_EVENT_FLAG_HAS_ID = …;
static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_OFFSET = …;
static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_EXTRA = …;
static constexpr uint32_t TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP = …;
static constexpr uint32_t TRACE_EVENT_FLAG_ASYNC_TTS = …;
static constexpr uint32_t TRACE_EVENT_FLAG_BIND_TO_ENCLOSING = …;
static constexpr uint32_t TRACE_EVENT_FLAG_FLOW_IN = …;
static constexpr uint32_t TRACE_EVENT_FLAG_FLOW_OUT = …;
static constexpr uint32_t TRACE_EVENT_FLAG_HAS_CONTEXT_ID = …;
static constexpr uint32_t TRACE_EVENT_FLAG_HAS_PROCESS_ID = …;
static constexpr uint32_t TRACE_EVENT_FLAG_HAS_LOCAL_ID = …;
static constexpr uint32_t TRACE_EVENT_FLAG_HAS_GLOBAL_ID = …;
static constexpr uint32_t TRACE_EVENT_FLAG_TYPED_PROTO_ARGS = …;
static constexpr uint32_t TRACE_EVENT_FLAG_JAVA_STRING_LITERALS = …;
static constexpr uint32_t TRACE_EVENT_FLAG_SCOPE_MASK = …;
static constexpr uint8_t TRACE_VALUE_TYPE_BOOL = …;
static constexpr uint8_t TRACE_VALUE_TYPE_UINT = …;
static constexpr uint8_t TRACE_VALUE_TYPE_INT = …;
static constexpr uint8_t TRACE_VALUE_TYPE_DOUBLE = …;
static constexpr uint8_t TRACE_VALUE_TYPE_POINTER = …;
static constexpr uint8_t TRACE_VALUE_TYPE_STRING = …;
static constexpr uint8_t TRACE_VALUE_TYPE_COPY_STRING = …;
static constexpr uint8_t TRACE_VALUE_TYPE_CONVERTABLE = …;
static constexpr uint8_t TRACE_VALUE_TYPE_PROTO = …;
static constexpr uint8_t TRACE_EVENT_SCOPE_GLOBAL = …;
static constexpr uint8_t TRACE_EVENT_SCOPE_PROCESS = …;
static constexpr uint8_t TRACE_EVENT_SCOPE_THREAD = …;
static constexpr char TRACE_EVENT_SCOPE_NAME_GLOBAL = …;
static constexpr char TRACE_EVENT_SCOPE_NAME_PROCESS = …;
static constexpr char TRACE_EVENT_SCOPE_NAME_THREAD = …;
#define TRACE_EVENT_API_CURRENT_THREAD_ID …
#endif
namespace perfetto {
namespace internal {
class PERFETTO_EXPORT_COMPONENT LegacyTraceId { … };
#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS
template <typename T>
bool IsEqual(T x, T y) { … }
template <typename T, typename U>
bool IsEqual(T, U) { … }
class PERFETTO_EXPORT_COMPONENT TrackEventLegacy { … };
#endif
template <typename T>
inline T PossiblyNull(T&& value) { … }
inline const char* PossiblyNull(const char* name) { … }
inline const char* PossiblyNull(char* name) { … }
}
}
#endif