DumpLLM
DumpLLM
#Overview
name: DumpLLM
This variable is created as a Console Variable (cvar).
- type:
Cmd
- help:
Logs out the current and peak sizes of all tracked LLM tags
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of DumpLLM is to provide a console command that logs out the current and peak sizes of all tracked Low-Level Memory (LLM) tags in Unreal Engine 5.
This setting variable is primarily used by the Low-Level Memory Tracking subsystem, which is part of the Core module in Unreal Engine. It’s specifically related to memory management and profiling.
The value of this variable is set as a console command using the FAutoConsoleCommand class. It’s defined in the LowLevelMemTracker.cpp file, which is part of the Core module.
The DumpLLM command interacts with the FLowLevelMemTracker class. It uses the EDumpFormat enum to determine the output format (plain text or CSV).
Developers should be aware that:
- This command can be invoked from the console to get a snapshot of memory usage.
- The output can be in either plain text or CSV format, depending on whether the “CSV” parameter is passed.
- This command is useful for debugging memory-related issues and optimizing memory usage in the engine.
Best practices when using this variable include:
- Use it during development and testing phases to monitor memory usage.
- Combine it with other memory profiling tools for a comprehensive view of memory allocation.
- Consider automating the collection of this data at key points in your game or application for consistent monitoring.
Regarding the associated variable, DumpLLM is actually the name of the console command itself, not a separate variable. The code snippet shows the definition and implementation of this console command. It’s created using FAutoConsoleCommand, which registers the command with Unreal Engine’s console system.
The command takes arguments and can output to a specified device. It parses the input arguments to determine the output format and then calls the appropriate methods on FLowLevelMemTracker to generate the memory usage report.
When using this command, developers should remember that it provides a snapshot of memory usage at the moment it’s called. For continuous monitoring, you might need to call it repeatedly or use other built-in profiling tools in Unreal Engine.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/LowLevelMemTracker.cpp:967
Scope: file
Source code excerpt:
{
FLowLevelMemTracker::Get().PublishDataSingleFrame();
}));
FAutoConsoleCommand DumpLLM(
TEXT("DumpLLM"),
TEXT("Logs out the current and peak sizes of all tracked LLM tags"),
FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda(
[](const TArray<FString>& Args, UWorld* InWorld, FOutputDevice& Ar)
{
FString Command = FString::Join(Args, TEXT(" "));
FLowLevelMemTracker::EDumpFormat DumpFormat = FLowLevelMemTracker::EDumpFormat::PlainText;
bool bCSV = FParse::Param(*Command, TEXT("CSV"));
if (bCSV)
{
DumpFormat = FLowLevelMemTracker::EDumpFormat::CSV;
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/LowLevelMemTracker.cpp:966
Scope: file
Source code excerpt:
FConsoleCommandDelegate::CreateLambda([]()
{
FLowLevelMemTracker::Get().PublishDataSingleFrame();
}));
FAutoConsoleCommand DumpLLM(
TEXT("DumpLLM"),
TEXT("Logs out the current and peak sizes of all tracked LLM tags"),
FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda(
[](const TArray<FString>& Args, UWorld* InWorld, FOutputDevice& Ar)
{
FString Command = FString::Join(Args, TEXT(" "));
FLowLevelMemTracker::EDumpFormat DumpFormat = FLowLevelMemTracker::EDumpFormat::PlainText;
bool bCSV = FParse::Param(*Command, TEXT("CSV"));
if (bCSV)
{
#Associated Variable and Callsites
This variable is associated with another variable named DumpLLM
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/LowLevelMemTracker.cpp:967
Scope: file
Source code excerpt:
{
FLowLevelMemTracker::Get().PublishDataSingleFrame();
}));
FAutoConsoleCommand DumpLLM(
TEXT("DumpLLM"),
TEXT("Logs out the current and peak sizes of all tracked LLM tags"),
FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda(
[](const TArray<FString>& Args, UWorld* InWorld, FOutputDevice& Ar)
{
FString Command = FString::Join(Args, TEXT(" "));
FLowLevelMemTracker::EDumpFormat DumpFormat = FLowLevelMemTracker::EDumpFormat::PlainText;
bool bCSV = FParse::Param(*Command, TEXT("CSV"));
if (bCSV)
{
DumpFormat = FLowLevelMemTracker::EDumpFormat::CSV;
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/HAL/LowLevelMemTracker.cpp:966
Scope: file
Source code excerpt:
FConsoleCommandDelegate::CreateLambda([]()
{
FLowLevelMemTracker::Get().PublishDataSingleFrame();
}));
FAutoConsoleCommand DumpLLM(
TEXT("DumpLLM"),
TEXT("Logs out the current and peak sizes of all tracked LLM tags"),
FConsoleCommandWithWorldArgsAndOutputDeviceDelegate::CreateLambda(
[](const TArray<FString>& Args, UWorld* InWorld, FOutputDevice& Ar)
{
FString Command = FString::Join(Args, TEXT(" "));
FLowLevelMemTracker::EDumpFormat DumpFormat = FLowLevelMemTracker::EDumpFormat::PlainText;
bool bCSV = FParse::Param(*Command, TEXT("CSV"));
if (bCSV)
{