Trace's thread can't be started before Trace has been initialised as some internals are not ready prior to that (i.e. the cache and the tail). TraceAux attempts to control the worker thread and indirectly started it too early when processing command line arguments. This would cause data races between the worker thread and initialisation.
#rb im
#rnx
#jira none
#preflight 63296dab0a4ad044de754095
[CL 22090244 by martin ridgers in ue5-main branch]
* Replaced OnTraceFileStarted delegate with OnTraceStarted
* Added OnTraceStopped delegate
* Both events pass if the recording was for a network or file type.
#rb Brian.Bekich, Martin.Ridgers
#preflight
[CL 22088546 by marc audy in ue5-main branch]
* Added trace file created callback: Useful to gather all trace files created during execution
* Added config option to disable or resize tail buffers via [Trace.Config]:TailSizeBytes
* Added config option for worker thread sleep time via [Trace.Config]:SleepTimeInMS
* Fixed init code so it never creates a workerthread in builds that don't support multithreading
#rb Martin.Ridgets, Ionut.Matasaru
[CL 22013173 by louisphilippe seguin in ue5-main branch]
Benchmarks/tests:
Using scope names from a large project (~220K string names), the average cost of adding an entry to TMap improved 2.4x (from 1.2us to 0.5us) and worst case improved 3.8x (from 80ms to 21ms).
Using Lyra (up to 5000 strings per TMap) the worst case improved 3.6x (from 11ms to 3ms).
#jira UE-147219
#rb Catalin.Dragoiu
#preflight 6315e02b7562a90dfa9fa055
[CL 21790925 by ionut matasaru in ue5-main branch]
Hooking a Windows API works by patching in a "jmp" instruction. The instructions that are overwritten by this patch are moved elsewhere (and appended with another jmp) such that the original function can still be called - I called this a trampoline. Prior to this change, trampolines were written into the null-filled slack space at the end of the code section. This however turned out to be too small as more hooks were added and as Windows' DLLs mutated. This change instead uses a page of address space which it allocates just before the DLL being patched (proximity is important as the jmp instruction used only has 32 bit signed displacement).
#rb im
#rnx
#jira UE-160315
#rb cdp
#preflight 62fc8c3e0f2aefc97a98ba72
[CL 21421841 by Martin Ridgers in ue5-main branch]
The implementation extends the existing FThreadIdleStats to track critical path vs non-critical path waits for a thread.
The cvar r.RenderThreadTimeIncludesDependentWaits forces the main renderthread stat to use the new behavior, but this is disabled by default for historical tracking reasons.
#rb Nuno Leiria
#ROBOMERGE-AUTHOR: ben.woodhouse
#ROBOMERGE-SOURCE: CL 21386702 via CL 21387159 via CL 21387356 via CL 21391039 via CL 21391830
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v975-21357124)
[CL 21394348 by ben woodhouse in ue5-main branch]
#rb serge.bernier
#ROBOMERGE-AUTHOR: ben.woodhouse
#ROBOMERGE-SOURCE: CL 21355012 via CL 21355934 via CL 21355993 via CL 21356002
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
[CL 21358177 by ben woodhouse in ue5-main branch]
- Fixed Trace.SnapshotFile not working when trace is already connected.
- Fixed Trace.SnapshotFile to also issue on connection callback. This allows writing events that are not cached but important for the cache (like FName deduplication events).
- Fixed Trace.SnapshotFile to emit sync events at the end of trace in order for analyzer to properly process all traced events.
- TraceLog: Fixed CallbackOnConnect when main thread has multiple local buffers (bug where only partial events were traced).
#jira UE-158136
#fyi Johan.Berg
#fyi Martin.Ridgers
#rb none
#preflight 62d7db1a4b6d775f5f9d4370
#robomerge FNMain
[CL 21178277 by ionut matasaru in ue5-main branch]
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#preflight 62c703bbd13fac04f11da948
[CL 20985655 by bryan sefcik in ue5-main branch]
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf
[CL 20979027 by bryan sefcik in ue5-main branch]
Add UE_TRACE_AUTOSTART define and set to 0 for FortniteServer
When set to 0 or -traceautostart=0 on command line then GTraceAutoStart is true and tracing isn't started until explicit Trace.Start command.
We disable channels and delay tracing until children are started for forked servers.
Note CL 20881185:
Disable Unreal Insights for servers
Add log when LLM is enabled due to Unreal Insights mem tracking being enabled.
[REVIEW] [at]johan.berg
[REVIEW] [at]johan.berg, [at]Ionut.Matasaru, [at]Ilya.Loshchinin
[FYI] Andrew.Ladenberger
#preflight 62aca6eec0449d3dccb9c4a1
#ROBOMERGE-OWNER: michael.sartain
#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 20747327 via CL 20926331 via CL 20926342
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)
[CL 20928049 by michael sartain in ue5-main branch]