Stack tracker. 更多...
#include <StackTracker.h>
类 | |
| struct | FCallStack |
| Helper structure to capture callstack addresses and stack count. 更多... | |
Public 类型 | |
| typedef void(* | StackTrackerReportFn) (const FCallStack &CallStack, uint64 TotalStackCount, FOutputDevice &Ar) |
| Used to optionally report information based on the current stack | |
| typedef void(* | StackTrackerUpdateFn) (const FCallStack &CallStack, void *UserData) |
| Used to optionally update the information currently stored with the callstack | |
Public 成员函数 | |
| CORE_API void | CaptureStackTrace (int32 EntriesToIgnore=2, void *UserData=nullptr, int32 StackLen=MAX_int32, bool bLookupStringsForAliasRemoval=false) |
| Captures the current stack and updates stack tracking information. 更多... | |
| CORE_API void | DumpStackTraces (int32 StackThreshold, FOutputDevice &Ar, float SampleCountCorrectionFactor=1.0) |
| Dumps capture stack trace summary to the passed in log. | |
| FStackTracker (StackTrackerUpdateFn InUpdateFn=NULL, StackTrackerReportFn InReportFn=NULL, bool bInIsEnabled=false) | |
| Constructor, initializing all member variables | |
| CORE_API void | ResetTracking () |
| Resets stack tracking. 更多... | |
| CORE_API void | ToggleTracking () |
| Toggles tracking. | |
静态 Public 属性 | |
| static const int32 | MAX_BACKTRACE_DEPTH = 50 |
| Maximum number of backtrace depth. | |
Stack tracker.
Used to identify callstacks at any point in the codebase.
| CORE_API void FStackTracker::CaptureStackTrace | ( | int32 | EntriesToIgnore = 2, |
| void * | UserData = nullptr, |
||
| int32 | StackLen = MAX_int32, |
||
| bool | bLookupStringsForAliasRemoval = false |
||
| ) |
Captures the current stack and updates stack tracking information.
optionally stores a user data pointer that the tracker will take ownership of and delete upon reset you must allocate the memory with FMemory::Malloc() EntriesToIgnore are removed from the top of then stack, then we keep at most StackLen of the remaining entries.
| CORE_API void FStackTracker::ResetTracking | ( | ) |
Resets stack tracking.
Deletes all user pointers passed in via CaptureStackTrace()