6#include COMPILED_PLATFORM_HEADER(PlatformMisc.h)
10#error UE_DEBUG_BREAK is not defined for this platform
13#ifndef PLATFORM_USES_ANSI_STRING_FOR_EXTERNAL_PROFILING
14#error PLATFORM_USES_ANSI_STRING_FOR_EXTERNAL_PROFILING is not defined.
17#ifndef PLATFORM_LIMIT_PROFILER_UNIQUE_NAMED_EVENTS
18#if defined(FRAMEPRO_ENABLED) && FRAMEPRO_ENABLED
21 #define PLATFORM_LIMIT_PROFILER_UNIQUE_NAMED_EVENTS 1
23 #define PLATFORM_LIMIT_PROFILER_UNIQUE_NAMED_EVENTS 0
27#ifndef PLATFORM_EMPTY_BASES
28#define PLATFORM_EMPTY_BASES
31#ifndef ALLOW_NAMED_EVENTS_IN_TEST
32#define ALLOW_NAMED_EVENTS_IN_TEST 1
36#define ENABLE_NAMED_EVENTS (!UE_BUILD_SHIPPING && (!UE_BUILD_TEST || ALLOW_NAMED_EVENTS_IN_TEST))
38#if PLATFORM_USES_ANSI_STRING_FOR_EXTERNAL_PROFILING
39 #define NAMED_EVENT_STR(x) x
41 #define NAMED_EVENT_STR(x) TEXT(x)
44#if ENABLE_NAMED_EVENTS
50 : bStarted(bCondition)
59 : bStarted(bCondition)
111#if PLATFORM_IMPLEMENTS_BeginNamedEventStatic
112 FPlatformMisc::BeginNamedEventStatic(
Color,
Text);
120#if PLATFORM_IMPLEMENTS_BeginNamedEventStatic
121 FPlatformMisc::BeginNamedEventStatic(
Color,
Text);
139 : bStarted(bCondition)
143#if PLATFORM_IMPLEMENTS_BeginNamedEventStatic
144 FPlatformMisc::BeginNamedEventStatic(
Color,
Text);
152 : bStarted(bCondition)
156#if PLATFORM_IMPLEMENTS_BeginNamedEventStatic
157 FPlatformMisc::BeginNamedEventStatic(
Color,
Text);
180#define SCOPED_NAMED_EVENT(Name, Color)\
181 FScopedNamedEventStatic ANONYMOUS_VARIABLE(NamedEvent_##Name##_)(Color, NAMED_EVENT_STR(#Name));\
182 TRACE_CPUPROFILER_EVENT_SCOPE(Name);
184#define SCOPED_NAMED_EVENT_FSTRING(Text, Color)\
185 FScopedNamedEvent ANONYMOUS_VARIABLE(NamedEvent_)(Color, *Text);\
186 TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*Text);
188#define SCOPED_NAMED_EVENT_TCHAR(Text, Color)\
189 FScopedNamedEvent ANONYMOUS_VARIABLE(NamedEvent_)(Color, Text);\
190 TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(Text);
192#define SCOPED_NAMED_EVENT_TEXT(Text, Color)\
193 FScopedNamedEventStatic ANONYMOUS_VARIABLE(NamedEvent_)(Color, NAMED_EVENT_STR(Text));\
194 TRACE_CPUPROFILER_EVENT_SCOPE_STR(Text);
196#define SCOPED_NAMED_EVENT_F(Format, Color, ...)\
197 FScopedNamedEvent ANONYMOUS_VARIABLE(NamedEvent_)(Color, *FString::Printf(Format, __VA_ARGS__));\
198 TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*FString::Printf(Format, __VA_ARGS__));
200#define SCOPED_NAMED_EVENT_TCHAR_CONDITIONAL(Text, Color, bCondition)\
201 FScopedNamedEventConditional ANONYMOUS_VARIABLE(NamedEvent_)(Color, Text, (bCondition));\
202 TRACE_CPUPROFILER_EVENT_SCOPE_TEXT_CONDITIONAL(Text, (bCondition));
206#define SCOPED_NAMED_EVENT(Name, Color) TRACE_CPUPROFILER_EVENT_SCOPE(Name);
207#define SCOPED_NAMED_EVENT_FSTRING(Text, Color) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*Text);
208#define SCOPED_NAMED_EVENT_TCHAR(Text, Color) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(Text);
209#define SCOPED_NAMED_EVENT_TEXT(Text, Color) TRACE_CPUPROFILER_EVENT_SCOPE_STR(Text);
210#define SCOPED_NAMED_EVENT_F(Format, Color, ...) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*FString::Printf(Format, __VA_ARGS__));
211#define SCOPED_NAMED_EVENT_TCHAR_CONDITIONAL(Text, Color, bCondition) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT_CONDITIONAL(Text, (bCondition));
215#define SCOPED_PROFILER_COLOR(...) UE_DEPRECATED_MACRO(5.5, "SCOPED_PROFILER_COLOR is deprecated and there is no replacement.")
234#define SCOPED_ENTER_BACKGROUND_EVENT(Name) \
235 FScopedEnterBackgroundEvent EnterBackgroundEvent_##Name##_(TEXT(#Name)); \
236 QUICK_SCOPE_CYCLE_COUNTER(Name);
239#ifdef PLATFORM_COMPILER_IWYU
245 template <
typename T,
bool IsSameTypes = true>
struct IwyuTestSize {
enum {
Value = 0 }; };
248#define IWYU_MARKUP_IMPLICIT_CAST(From, To) UE::Core::Private::IwyuTestSize<From, std::is_same<typename std::remove_cv<To>::type, typename std::remove_cv<From>::type>::value>::Value
251#define IWYU_MARKUP_IMPLICIT_CAST(From, To)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition PlatformMisc.h:219
FScopedEnterBackgroundEvent(const TCHAR *Text)
Definition PlatformMisc.h:222
~FScopedEnterBackgroundEvent()
Definition PlatformMisc.h:227
Definition PlatformMisc.h:135
FScopedNamedEventConditionalStatic(const struct FColor &Color, const ANSICHAR *Text, bool bCondition)
Definition PlatformMisc.h:151
~FScopedNamedEventConditionalStatic()
Definition PlatformMisc.h:164
FScopedNamedEventConditionalStatic(const struct FColor &Color, const TCHAR *Text, bool bCondition)
Definition PlatformMisc.h:138
Definition PlatformMisc.h:47
FScopedNamedEventConditional(const struct FColor &Color, const TCHAR *Text, bool bCondition)
Definition PlatformMisc.h:49
FScopedNamedEventConditional(const struct FColor &Color, const ANSICHAR *Text, bool bCondition)
Definition PlatformMisc.h:58
~FScopedNamedEventConditional()
Definition PlatformMisc.h:67
Definition PlatformMisc.h:106
FScopedNamedEventStatic(const struct FColor &Color, const TCHAR *Text)
Definition PlatformMisc.h:109
~FScopedNamedEventStatic()
Definition PlatformMisc.h:127
FScopedNamedEventStatic(const struct FColor &Color, const ANSICHAR *Text)
Definition PlatformMisc.h:118
Definition PlatformMisc.h:80
~FScopedNamedEvent()
Definition PlatformMisc.h:93
FScopedNamedEvent(const struct FColor &Color, const ANSICHAR *Text)
Definition PlatformMisc.h:88
FScopedNamedEvent(const struct FColor &Color, const TCHAR *Text)
Definition PlatformMisc.h:83
implementation
Definition PlayInEditorLoadingScope.h:8
@ false
Definition radaudio_common.h:23