1) TlsAutoCleanup: in the previous version `FTlsAutoCleanup` used `FRunnableThread` to store registered instances and to delete them on `FRunnableThread` destruction. This means that all threads that are not created by `FRunnableThread` (the game thread in particular, and all 3rd-party threads) never delete registered `FTlsAutoCleanup` instances. This change moves the storage from `FRunnableThread` to TLS to cover all threads
Thsi change can break systems that implemented a workaround for this problem, e.g. by manually deleting registered `FTlsAutoCleanup` instances on the game thread exit, as now this instances will be deleted twice. The solution is to remove the workaround and to rely on uniform `FTlsAutoCleanup` behaviour on all threads.
#rb steve.robb
2) removed CpuProfilerTrace workaround to handle the fact that FTlsAutoCleanup leaks on the game thread, as this is fixed by (1).
#rb martin.ridgers
Need to submit both parts together as they need each other
#robomerge Release-5.0-EarlyAccess
[CL 15624597 by Andriy Tylychko in ue5-main branch]
Back out of previous new base cycle event change and use the absolute 64-bit cycle value instead. The previous solution did not support late connect scenarios. The memory cost is not significant based on the current marker frequency.
#rb martin.ridgers
[CL 15623871 by Johan Berg in ue5-main branch]
Fix compile error in UnrealMultiUserServer - LLM defines need to be wrapped in (), and tagtrace needs to check for ENABLE_LOW_LEVEL_MEM_TRACKER.
#rb Jimmy.Andrews
#rnx
[CL 15586298 by Matt Peters in ue5-main branch]
Add function to query if the static API is init and thread should be running
Tidy up some direct checks to the init count to use the new IsRunning function
Make init reference count signed and check for it going negative (mismatched startup/shutdown calls)
Disclaimer: init reference count isn't really used yet, but I'm hoping to propose using it more broadly in the future
#rb francis.hurteau
#jira none
#preflight /job/602c184cada6960001aa3e12
#ROBOMERGE-SOURCE: CL 15425482 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15426390 by geoff evans in ue5-main branch]
For now we don't want QA/Automation test results to write JIRAs for these events, we will triage them offline using analytics.
#rb trivial
#jira UE-108077
#ROBOMERGE-SOURCE: CL 15412939 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15412952 by geoff evans in ue5-main branch]
Memory initialization event needs to be marked as important because we cannot receive time marker events before setting the base timestamp. It leads to negative time values.
#rb ionut.matasaru
[CL 15405613 by Johan Berg in ue5-main branch]
Add support for detectors that are constructed outside of when the StallDetector system is started up.
This gives us the flexibility to startup and shutdown within a finer scope of process startup and shutdown coming in a future change.
#rb francis.hurteau
#jira none
#preflight /job/6025c98c095d790001cca8f5
#ROBOMERGE-SOURCE: CL 15398967 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15398973 by geoff evans in ue5-main branch]
Use SleepNoStats to prevent stat accumulation of sleep time
Remove CPUTRACE macros to remove dependency on that system (they weren't really useful)
Improve StallDetector logging
#rb francis.hurteau
#jira none
#preflight /job/602195055cb1b300015c6218
#ROBOMERGE-SOURCE: CL 15361323 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15361335 by geoff evans in ue5-main branch]
CallstackTrace was register a callback for OnExit during static init, but this callback could be overwritten due to initialization order. Move the registering later to fix this.
#rnx
#jira UE-107085
#rb paul.chipchase
[CL 15300711 by Johan Berg in ue5-main branch]
This adds some scalar statistics to the session summary:
* The total stall trigger count
* The total reported stalls
* The top stall name
* The top stall budget time in seconds
* The top stall cumulative overage time in seconds
* The top stall trigger count
#jira none
#rb patrick.laflamme, francis.hurteau
#preflight /job/6019a5ef797f69000126f9b6
[CL 15284567 by geoff evans in ue5-main branch]
On process exit the worker thread is killed, but we need orderly shutdown to avoid dropped callstacks and deadlocks when allocating during static deinitialization.
#rb ionut.matasaru, martin.ridgers
#rnx
#jira UE-107085
[CL 15237564 by Johan Berg in ue5-main branch]
This code is meant to help locate and send reports/telemetry for slow code pathways that create unresponsive conditions
FGameThreadHitchHeartBeatThreaded was considered, but doesn't fit Editor's needs because its designed around general GameThread deadlines
Editor workloads are much less homogenous, and proper async support for a consistent GameThread deadline in Editor is a ways away
This necessitates a more focused approach where we can instrument specific routines such that each issue their own telemetry report
Add a "Stalls" counter in the Frame Rate and Memory title bar stats
Add LogStall Log category for viewing details about stalls that have occurred
Introduces a stall counter object on the GameThread to collect statistical data about stalls (this will not report to telemetry)
Future changes will introduce report objects into specific routines to upload to crashreporter
Future changes will introduce support for non-Windows OSes
#jira none
#rb francis.hurteau
[CL 15213394 by geoff evans in ue5-main branch]