UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IoStoreTrace.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreTypes.h"
5#include "Misc/Build.h"
6#include "Trace/Config.h"
7
8// requires -trace=metadata,assetmetadata,iostore
9
10#if !defined(UE_TRACE_IOSTORE_ENABLED) // to allow users to manually disable it from build.cs files
11 #if !UE_BUILD_SHIPPING
12 #define UE_TRACE_IOSTORE_ENABLED UE_TRACE_ENABLED
13 #else
14 #define UE_TRACE_IOSTORE_ENABLED 0
15 #endif
16#endif
17
18#if UE_TRACE_IOSTORE_ENABLED
19
20
23
24class FIoBatch;
25class FIoRequestImpl;
27
28struct FIoStoreTrace
29{
36};
37
39
40#define TRACE_IOSTORE_BACKEND_NAME(IoDispatcherBackend, Name) \
41 FIoStoreTrace::BackendName(IoDispatcherBackend, Name);
42
43#define TRACE_IOSTORE_REQUEST_CREATE(IoBatch,IoRequestImpl) \
44 FIoStoreTrace::RequestCreate(IoBatch,IoRequestImpl);
45
46#define TRACE_IOSTORE_REQUEST_UNRESOLVED(IoRequestImpl) \
47 FIoStoreTrace::RequestUnresolved(IoRequestImpl);
48
49#define TRACE_IOSTORE_BACKEND_REQUEST_STARTED(IoRequestImpl, IoDispatcherBackend) \
50 FIoStoreTrace::RequestStarted(IoRequestImpl, IoDispatcherBackend);
51
52#define TRACE_IOSTORE_BACKEND_REQUEST_COMPLETED(IoRequestImpl, Size) \
53 FIoStoreTrace::RequestCompleted(IoRequestImpl, Size);
54
55#define TRACE_IOSTORE_BACKEND_REQUEST_FAILED(IoRequestImpl) \
56 FIoStoreTrace::RequestFailed(IoRequestImpl);
57
58// creates a metadata scope that includes a tag string for identifying upackage data - used for IoStore usage where an asset/package cannot be determined (e.g. bulk data)
59#if UE_TRACE_METADATA_ENABLED
63
64 #define TRACE_IOSTORE_METADATA_SCOPE_TAG(TagName) \
65 auto TagNameRef = bool(MetadataChannel) && bool(IoStoreChannel) ? FStringTrace::GetNameRef(TagName) : UE::Trace::FEventRef32(0,0); \
66 UE_TRACE_METADATA_SCOPE(IoStoreTag, IoStoreChannel) \
67 << IoStoreTag.Tag(TagNameRef);
68#else
69 #define TRACE_IOSTORE_METADATA_SCOPE_TAG(...)
70#endif
71
72#else
73
74#define TRACE_IOSTORE_BACKEND_NAME(...)
75#define TRACE_IOSTORE_REQUEST_CREATE(...)
76#define TRACE_IOSTORE_REQUEST_UNRESOLVED(...)
77#define TRACE_IOSTORE_BACKEND_REQUEST_STARTED(...)
78#define TRACE_IOSTORE_BACKEND_REQUEST_COMPLETED(...)
79#define TRACE_IOSTORE_BACKEND_REQUEST_FAILED(...)
80
81#define TRACE_IOSTORE_METADATA_SCOPE_TAG(...)
82
83#endif //UE_TRACE_IOSTORE_ENABLED
84
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
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
#define UE_TRACE_METADATA_EVENT_END()
Definition MetadataTrace.h:100
#define UE_TRACE_METADATA_EVENT_BEGIN_EXTERN(ScopeName,...)
Definition MetadataTrace.h:96
#define UE_TRACE_CHANNEL_EXTERN(ChannelName,...)
Definition Trace.h:448
uint32 Size
Definition VulkanMemory.cpp:4034
Definition IoDispatcher.h:285
Definition IoDispatcherBackend.h:23
Definition NameTypes.h:617
Definition IoDispatcherBackend.h:186