Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions | Variables
SkTraceEvent.h File Reference
#include "include/utils/SkEventTracer.h"
#include "src/base/SkUtils.h"
#include "src/core/SkTraceEventCommon.h"
#include <atomic>

Go to the source code of this file.

Classes

class  skia_private::TraceID
 
class  skia_private::TraceStringWithCopy
 
class  skia_private::ScopedTracer
 

Namespaces

namespace  skia_private
 

Macros

#define TRACE_FUNC   __PRETTY_FUNCTION__
 
#define TRACE_STR_COPY(str)   (::skia_private::TraceStringWithCopy(str))
 
#define TRACE_STR_STATIC(str)   (str)
 
#define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()
 
#define TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED    SkEventTracer::GetInstance()->getCategoryGroupEnabled
 
#define TRACE_EVENT_API_ADD_TRACE_EVENT    SkEventTracer::GetInstance()->addTraceEvent
 
#define TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION    SkEventTracer::GetInstance()->updateTraceEventDuration
 
#define TRACE_EVENT_API_NEW_TRACE_SECTION    SkEventTracer::GetInstance()->newTracingSection
 
#define TRACE_EVENT_API_CLASS_EXPORT   SK_API
 
#define TRACE_CATEGORY_PREFIX   "disabled-by-default-"
 
#define INTERNAL_TRACE_EVENT_UID3(a, b)    trace_event_unique_##a##b
 
#define INTERNAL_TRACE_EVENT_UID2(a, b)    INTERNAL_TRACE_EVENT_UID3(a,b)
 
#define INTERNAL_TRACE_EVENT_UID(name_prefix)    INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__)
 
#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO_CUSTOM_VARIABLES(category_group, atomic, category_group_enabled)
 
#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group)
 
#define INTERNAL_TRACE_EVENT_ADD(phase, category_group, name, flags, ...)
 
#define INTERNAL_TRACE_EVENT_ADD_WITH_ID(phase, category_group, name, id, flags, ...)
 
#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, ...)
 

Functions

template<typename T >
static void skia_private::SetTraceValue (const T &arg, unsigned char *type, uint64_t *value)
 
static const char * skia_private::TraceValueAsString (uint64_t value)
 
static const void * skia_private::TraceValueAsPointer (uint64_t value)
 
static SkEventTracer::Handle skia_private::AddTraceEvent (char phase, const uint8_t *category_group_enabled, const char *name, uint64_t id, unsigned char flags)
 
template<class ARG1_TYPE >
static SkEventTracer::Handle skia_private::AddTraceEvent (char phase, const uint8_t *category_group_enabled, const char *name, uint64_t id, unsigned char flags, const char *arg1_name, const ARG1_TYPE &arg1_val)
 
template<class ARG1_TYPE , class ARG2_TYPE >
static SkEventTracer::Handle skia_private::AddTraceEvent (char phase, const uint8_t *category_group_enabled, const char *name, uint64_t id, unsigned char flags, const char *arg1_name, const ARG1_TYPE &arg1_val, const char *arg2_name, const ARG2_TYPE &arg2_val)
 

Variables

const int skia_private::kZeroNumArgs = 0
 
const uint64_t skia_private::kNoEventId = 0
 

Macro Definition Documentation

◆ INTERNAL_TRACE_EVENT_ADD

#define INTERNAL_TRACE_EVENT_ADD (   phase,
  category_group,
  name,
  flags,
  ... 
)
Value:
do { \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
phase, INTERNAL_TRACE_EVENT_UID(category_group_enabled), name, \
skia_private::kNoEventId, flags, ##__VA_ARGS__); \
} \
} while (0)
#define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()
Definition: SkTraceEvent.h:76
#define INTERNAL_TRACE_EVENT_UID(name_prefix)
Definition: SkTraceEvent.h:140
FlutterSemanticsFlag flags
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
const uint64_t kNoEventId
Definition: SkTraceEvent.h:215
static SkEventTracer::Handle AddTraceEvent(char phase, const uint8_t *category_group_enabled, const char *name, uint64_t id, unsigned char flags, const char *arg1_name, const ARG1_TYPE &arg1_val, const char *arg2_name, const ARG2_TYPE &arg2_val)
Definition: SkTraceEvent.h:342

Definition at line 166 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_ADD_SCOPED

#define INTERNAL_TRACE_EVENT_ADD_SCOPED (   category_group,
  name,
  ... 
)
Value:
skia_private::ScopedTracer INTERNAL_TRACE_EVENT_UID(tracer); \
do { \
INTERNAL_TRACE_EVENT_UID(category_group_enabled), \
TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__); \
INTERNAL_TRACE_EVENT_UID(tracer).Initialize( \
INTERNAL_TRACE_EVENT_UID(category_group_enabled), name, h); \
} \
} while (0)
#define TRACE_EVENT_FLAG_NONE
#define TRACE_EVENT_PHASE_COMPLETE
#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group)
Definition: SkTraceEvent.h:156
uint64_t Handle
Definition: SkEventTracer.h:26
static SkEventTracer::Handle AddTraceEvent(char phase, const uint8_t *category_group_enabled, const char *name, uint64_t id, unsigned char flags)
Definition: SkTraceEvent.h:310
SkScalar h

Definition at line 195 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_ADD_WITH_ID

#define INTERNAL_TRACE_EVENT_ADD_WITH_ID (   phase,
  category_group,
  name,
  id,
  flags,
  ... 
)
Value:
do { \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
unsigned char trace_event_flags = flags | TRACE_EVENT_FLAG_HAS_ID; \
skia_private::TraceID trace_event_trace_id( \
id, &trace_event_flags); \
phase, INTERNAL_TRACE_EVENT_UID(category_group_enabled), \
name, trace_event_trace_id.data(), trace_event_flags, \
##__VA_ARGS__); \
} \
} while (0)
#define TRACE_EVENT_FLAG_HAS_ID

Definition at line 178 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE

#define INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE ( )

◆ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO

#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO (   category_group)
Value:
static std::atomic<intptr_t> INTERNAL_TRACE_EVENT_UID(atomic){0}; \
const uint8_t* INTERNAL_TRACE_EVENT_UID(category_group_enabled); \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO_CUSTOM_VARIABLES( \
TRACE_CATEGORY_PREFIX category_group, \
INTERNAL_TRACE_EVENT_UID(category_group_enabled));
#define TRACE_CATEGORY_PREFIX
Definition: SkTraceEvent.h:129

Definition at line 156 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO_CUSTOM_VARIABLES

#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO_CUSTOM_VARIABLES (   category_group,
  atomic,
  category_group_enabled 
)
Value:
category_group_enabled = \
reinterpret_cast<const uint8_t*>(atomic.load(std::memory_order_relaxed)); \
if (!category_group_enabled) { \
category_group_enabled = TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); \
atomic.store(reinterpret_cast<intptr_t>(category_group_enabled), \
std::memory_order_relaxed); \
}
#define TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED
Definition: SkTraceEvent.h:89

Definition at line 146 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_UID

#define INTERNAL_TRACE_EVENT_UID (   name_prefix)     INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__)

Definition at line 140 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_UID2

#define INTERNAL_TRACE_EVENT_UID2 (   a,
  b 
)     INTERNAL_TRACE_EVENT_UID3(a,b)

Definition at line 138 of file SkTraceEvent.h.

◆ INTERNAL_TRACE_EVENT_UID3

#define INTERNAL_TRACE_EVENT_UID3 (   a,
  b 
)     trace_event_unique_##a##b

Definition at line 136 of file SkTraceEvent.h.

◆ TRACE_CATEGORY_PREFIX

#define TRACE_CATEGORY_PREFIX   "disabled-by-default-"

Definition at line 129 of file SkTraceEvent.h.

◆ TRACE_EVENT_API_ADD_TRACE_EVENT

#define TRACE_EVENT_API_ADD_TRACE_EVENT    SkEventTracer::GetInstance()->addTraceEvent

Definition at line 103 of file SkTraceEvent.h.

◆ TRACE_EVENT_API_CLASS_EXPORT

#define TRACE_EVENT_API_CLASS_EXPORT   SK_API

Definition at line 125 of file SkTraceEvent.h.

◆ TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED

#define TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED    SkEventTracer::GetInstance()->getCategoryGroupEnabled

Definition at line 89 of file SkTraceEvent.h.

◆ TRACE_EVENT_API_NEW_TRACE_SECTION

#define TRACE_EVENT_API_NEW_TRACE_SECTION    SkEventTracer::GetInstance()->newTracingSection

Definition at line 120 of file SkTraceEvent.h.

◆ TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION

#define TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION    SkEventTracer::GetInstance()->updateTraceEventDuration

Definition at line 111 of file SkTraceEvent.h.

◆ TRACE_FUNC

#define TRACE_FUNC   __PRETTY_FUNCTION__

Definition at line 30 of file SkTraceEvent.h.

◆ TRACE_STR_COPY

#define TRACE_STR_COPY (   str)    (::skia_private::TraceStringWithCopy(str))

Definition at line 63 of file SkTraceEvent.h.

◆ TRACE_STR_STATIC

#define TRACE_STR_STATIC (   str)    (str)

Definition at line 73 of file SkTraceEvent.h.