18#if TRACE_PRIVATE_MINIMAL_ENABLED && TRACE_PRIVATE_ALLOW_IMPORTANTS
30 static_assert(!!(
uint32(T::EventFlags) &
uint32(FEventInfo::Flag_MaybeHasAux)),
"Only important trace events with array-type fields need a size parameter to UE_TRACE_LOG()");
32 ArrayDataSize +=
sizeof(FAuxHeader) * T::EventProps_Meta::NumAuxFields;
36 uint32 Uid = T::GetUid() >> EKnownEventUids::_UidShift;
39 Ret.AuxCursor +=
Size;
40 Ret.Ptr[Ret.AuxCursor] =
uint8(EKnownEventUids::AuxDataTerminal);
48 static_assert(!(
uint32(T::EventFlags) &
uint32(FEventInfo::Flag_MaybeHasAux)),
"Important trace events with array-type fields must be traced with UE_TRACE_LOG(Logger, Event, Channel, ArrayDataSize)");
51 uint32 Uid = T::GetUid() >> EKnownEventUids::_UidShift;
61 AllocSize +=
sizeof(FImportantEventHeader);
64 int32 NegSizeAndRef = 0 - ((AllocSize << FSharedBuffer::CursorShift) | FSharedBuffer::RefBit);
81 FImportantLogScope Ret;
82 Ret.Ptr = Out +
sizeof(FImportantEventHeader);
96template <
typename FieldMeta,
typename Type>
97struct FImportantLogScope::FFieldSet
100 static void Impl(FImportantLogScope* Scope,
const Type&
Value)
102 uint8* Dest = (
uint8*)(Scope->Ptr) + FieldMeta::Offset;
108template <
typename FieldMeta,
typename Type>
112 static void Impl(FImportantLogScope* Scope, Type
const* Data,
int32 Num)
117 Pack |= (FieldMeta::Index &
int32(EIndexPack::NumFieldsMask)) << FAuxHeader::FieldShift;
119 uint8* Out = Scope->Ptr + Scope->AuxCursor;
120 memcpy(Out, &Pack,
sizeof(Pack));
121 Out[0] =
uint8(EKnownEventUids::AuxData);
125 Scope->AuxCursor +=
sizeof(FAuxHeader) +
Size;
126 Scope->Ptr[Scope->AuxCursor] =
uint8(EKnownEventUids::AuxDataTerminal);
131template <
typename FieldMeta>
143 Pack |= (FieldMeta::Index &
int32(EIndexPack::NumFieldsMask)) << FAuxHeader::FieldShift;
145 uint8* Out = Scope->Ptr + Scope->AuxCursor;
146 memcpy(Out, &Pack,
sizeof(Pack));
147 Out[0] =
uint8(EKnownEventUids::AuxData);
151 Scope->AuxCursor +=
sizeof(FAuxHeader) +
Length;
152 Scope->Ptr[Scope->AuxCursor] =
uint8(EKnownEventUids::AuxDataTerminal);
165 Pack |= (FieldMeta::Index &
int32(EIndexPack::NumFieldsMask)) << FAuxHeader::FieldShift;
167 uint8* Out = Scope->Ptr + Scope->AuxCursor;
168 memcpy(Out, &Pack,
sizeof(Pack));
169 Out[0] =
uint8(EKnownEventUids::AuxData);
171 Out +=
sizeof(FAuxHeader);
174 *Out =
int8(*String);
179 Scope->AuxCursor +=
sizeof(FAuxHeader) +
Length;
180 Scope->Ptr[Scope->AuxCursor] =
uint8(EKnownEventUids::AuxDataTerminal);
185template <
typename FieldMeta>
200 Pack |= (FieldMeta::Index &
int32(EIndexPack::NumFieldsMask)) << FAuxHeader::FieldShift;
202 uint8* Out = Scope->Ptr + Scope->AuxCursor;
203 memcpy(Out, &Pack,
sizeof(Pack));
204 Out[0] =
uint8(EKnownEventUids::AuxData);
206 memcpy(Out +
sizeof(FAuxHeader), String,
Size);
208 Scope->AuxCursor +=
sizeof(FAuxHeader) +
Size;
209 Scope->Ptr[Scope->AuxCursor] =
uint8(EKnownEventUids::AuxDataTerminal);
214template <
typename FieldMeta,
typename DefinitionType>
227template <
typename FieldMeta,
typename Type>
235template <
typename FieldMeta,
typename Type>
243template <
typename FieldMeta>
255template <
typename FieldMeta>
263template <
typename FieldMeta,
typename DefinitionType>
#define UE_AUTORTFM_ALWAYS_OPEN
Definition AutoRTFMDefines.h:114
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32 Size
Definition VulkanMemory.cpp:4034
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
Definition SharedBuffer.h:341
Definition ImportantLogScope.h:38
void operator+=(const FImportantLogScope &) const
static FImportantLogScope Enter()
Definition ImportantLogScope.h:41
@ Trace
Definition NetTraceConfig.h:23
Type
Definition PawnAction_Move.h:11
Definition ExpressionParserTypes.h:21
Definition OverriddenPropertySet.cpp:45
bool Pack(uint8 *OutBuf, const SIZE_T BufSize, const FUdpPingPacket &Packet)
Definition UDPPing.cpp:1134
Type AtomicAddRelaxed(Type volatile *Target, Type Value)
Definition Atomic.h:131
Type AtomicLoadAcquire(Type volatile *Source)
Definition Atomic.h:67
Type AtomicAddRelease(Type volatile *Target, Type Value)
Definition Atomic.h:147
@ Reference
Definition Protocol6.h:40
@ Bias
Definition Transport.h:27
AnsiString
Definition Trace.h:52
WideString
Definition Trace.h:53
Definition AdvancedWidgetsModule.cpp:13
Definition ImportantLogScope.inl:229
static void Impl(FImportantLogScope *Scope, const Type &Value)
Definition ImportantLogScope.inl:230