UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LoadTimeTracePrivate.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#if LOADTIMEPROFILERTRACE_ENABLED
8
9class UObject;
10class FName;
11
13{
14 static void OutputStartAsyncLoading();
15 static void OutputSuspendAsyncLoading();
16 static void OutputResumeAsyncLoading();
17 static void OutputNewAsyncPackage(const void* AsyncPackage);
18 static void OutputDestroyAsyncPackage(const void* AsyncPackage);
19 static void OutputNewLinker(const void* Linker);
20 static void OutputDestroyLinker(const void* Linker);
21 static void OutputBeginRequest(uint64 RequestId);
22 static void OutputEndRequest(uint64 RequestId);
23 static void OutputPackageSummary(const void* AsyncPackage, const FName& PackageName, uint32 TotalHeaderSize, uint32 ImportCount, uint32 ExportCount, int32 Priority);
24 static void OutputAsyncPackageImportDependency(const void* Package, const void* ImportedPackage);
25 static void OutputAsyncPackageRequestAssociation(const void* AsyncPackage, uint64 RequestId);
26 static void OutputAsyncPackageLinkerAssociation(const void* AsyncPackage, const void* Linker);
27 static void OutputClassInfo(const UClass* Class, const FName& Name);
28 static void OutputClassInfo(const UClass* Class, const TCHAR* Name);
29 static void OutputBeginProcessSummary(const void* AsyncPackage);
30 static void OutputEndProcessSummary();
31
33 {
34 FProcessSummaryScope(const void* AsyncPackage);
36 };
37
39 {
40 FCreateExportScope(const void* AsyncPackage, const UObject* const* InObject);
42
43 private:
44 const UObject* const* Object;
45 };
46
48 {
49 FSerializeExportScope(const UObject* Object, uint64 SerialSize);
51 };
52
53 struct FPostLoadScope
54 {
57 };
58
60 {
63 };
64};
65
66#define TRACE_LOADTIME_START_ASYNC_LOADING() \
67 FLoadTimeProfilerTracePrivate::OutputStartAsyncLoading();
68
69#define TRACE_LOADTIME_SUSPEND_ASYNC_LOADING() \
70 FLoadTimeProfilerTracePrivate::OutputSuspendAsyncLoading();
71
72#define TRACE_LOADTIME_RESUME_ASYNC_LOADING() \
73 FLoadTimeProfilerTracePrivate::OutputResumeAsyncLoading();
74
75#define TRACE_LOADTIME_BEGIN_REQUEST(RequestId) \
76 FLoadTimeProfilerTracePrivate::OutputBeginRequest(RequestId);
77
78#define TRACE_LOADTIME_END_REQUEST(RequestId) \
79 FLoadTimeProfilerTracePrivate::OutputEndRequest(RequestId);
80
81#define TRACE_LOADTIME_NEW_ASYNC_PACKAGE(AsyncPackage) \
82 FLoadTimeProfilerTracePrivate::OutputNewAsyncPackage(AsyncPackage)
83
84#define TRACE_LOADTIME_DESTROY_ASYNC_PACKAGE(AsyncPackage) \
85 FLoadTimeProfilerTracePrivate::OutputDestroyAsyncPackage(AsyncPackage);
86
87#define TRACE_LOADTIME_NEW_LINKER(Linker) \
88 FLoadTimeProfilerTracePrivate::OutputNewLinker(Linker)
89
90#define TRACE_LOADTIME_DESTROY_LINKER(Linker) \
91 FLoadTimeProfilerTracePrivate::OutputDestroyLinker(Linker);
92
93#define TRACE_LOADTIME_PACKAGE_SUMMARY(AsyncPackage, PackageName, TotalHeaderSize, ImportCount, ExportCount, Priority) \
94 FLoadTimeProfilerTracePrivate::OutputPackageSummary(AsyncPackage, PackageName, TotalHeaderSize, ImportCount, ExportCount, Priority);
95
96#define TRACE_LOADTIME_ASYNC_PACKAGE_REQUEST_ASSOCIATION(AsyncPackage, RequestId) \
97 FLoadTimeProfilerTracePrivate::OutputAsyncPackageRequestAssociation(AsyncPackage, RequestId);
98
99#define TRACE_LOADTIME_ASYNC_PACKAGE_LINKER_ASSOCIATION(AsyncPackage, Linker) \
100 FLoadTimeProfilerTracePrivate::OutputAsyncPackageLinkerAssociation(AsyncPackage, Linker);
101
102#define TRACE_LOADTIME_ASYNC_PACKAGE_IMPORT_DEPENDENCY(AsyncPackage, ImportedAsyncPackage) \
103 FLoadTimeProfilerTracePrivate::OutputAsyncPackageImportDependency(AsyncPackage, ImportedAsyncPackage);
104
105#define TRACE_LOADTIME_PROCESS_SUMMARY_SCOPE(AsyncPackage) \
106 FLoadTimeProfilerTracePrivate::FProcessSummaryScope __LoadTimeTraceProcessSummaryScope(AsyncPackage);
107
108#define TRACE_LOADTIME_BEGIN_PROCESS_SUMMARY(AsyncPackage) \
109 FLoadTimeProfilerTracePrivate::OutputBeginProcessSummary(AsyncPackage);
110
111#define TRACE_LOADTIME_END_PROCESS_SUMMARY \
112 FLoadTimeProfilerTracePrivate::OutputEndProcessSummary();
113
114#define TRACE_LOADTIME_CREATE_EXPORT_SCOPE(AsyncPackage, Object) \
115 FLoadTimeProfilerTracePrivate::FCreateExportScope __LoadTimeTraceCreateExportScope(AsyncPackage, Object);
116
117#define TRACE_LOADTIME_SERIALIZE_EXPORT_SCOPE(Object, SerialSize) \
118 FLoadTimeProfilerTracePrivate::FSerializeExportScope __LoadTimeTraceSerializeExportScope(Object, SerialSize);
119
120#define TRACE_LOADTIME_POSTLOAD_SCOPE \
121 FLoadTimeProfilerTracePrivate::FPostLoadScope __LoadTimeTracePostLoadScope;
122
123#define TRACE_LOADTIME_POSTLOAD_OBJECT_SCOPE(Object) \
124 FLoadTimeProfilerTracePrivate::FPostLoadObjectScope __LoadTimeTracePostLoadObjectScope(Object);
125
126#define TRACE_LOADTIME_CLASS_INFO(Class, Name) \
127 FLoadTimeProfilerTracePrivate::OutputClassInfo(Class, Name);
128
129#else
130
131#define TRACE_LOADTIME_START_ASYNC_LOADING(...)
132#define TRACE_LOADTIME_SUSPEND_ASYNC_LOADING(...)
133#define TRACE_LOADTIME_RESUME_ASYNC_LOADING(...)
134#define TRACE_LOADTIME_BEGIN_REQUEST(...)
135#define TRACE_LOADTIME_END_REQUEST(...)
136#define TRACE_LOADTIME_NEW_ASYNC_PACKAGE(...)
137#define TRACE_LOADTIME_DESTROY_ASYNC_PACKAGE(...)
138#define TRACE_LOADTIME_NEW_LINKER(...)
139#define TRACE_LOADTIME_DESTROY_LINKER(...)
140#define TRACE_LOADTIME_PACKAGE_SUMMARY(...)
141#define TRACE_LOADTIME_ASYNC_PACKAGE_REQUEST_ASSOCIATION(...)
142#define TRACE_LOADTIME_ASYNC_PACKAGE_LINKER_ASSOCIATION(...)
143#define TRACE_LOADTIME_ASYNC_PACKAGE_IMPORT_DEPENDENCY(...)
144#define TRACE_LOADTIME_PROCESS_SUMMARY_SCOPE(...)
145#define TRACE_LOADTIME_BEGIN_PROCESS_SUMMARY(...)
146#define TRACE_LOADTIME_END_PROCESS_SUMMARY
147#define TRACE_LOADTIME_CREATE_EXPORT_SCOPE(...)
148#define TRACE_LOADTIME_SERIALIZE_EXPORT_SCOPE(...)
149#define TRACE_LOADTIME_POSTLOAD_SCOPE
150#define TRACE_LOADTIME_POSTLOAD_OBJECT_SCOPE(...)
151#define TRACE_LOADTIME_CLASS_INFO(...)
152
153#endif
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition Class.h:3793
Definition Object.h:95
Definition Linker.cpp:38