Commit Graph

193 Commits

Author SHA1 Message Date
geoff evans
af1784ca1d Add -tracefiletrunc cmdline option to allow for overwriting a trace named on the commane line.
This is desired for data center builds where we only care about one trace at a time, and uniquely naming or rotating the file name just makes for extra complexity and bug risk in calling code. Also, for incremental worker configurations we can leak disk consumption if we use a different file name every time.

Win/Mac/Linux all have the truncate file open flag set, so the platform file code should all allow for this.

Tested on windows.

#rb martin.ridgers, francis.hurteau

[CL 14828368 by geoff evans in ue5-main branch]
2020-12-01 11:46:13 -04:00
Johan Berg
f93b8820ed Add tags to memory tracing.
Instrument LLM scopes (LLM_SCOPE and LLM_REALLOC_SCOPE) with hooks to memory tracing. Added new trace events for the scopes and for specifying tags. Only available on platforms where  allocation tracing is activated.

#rb martin.ridgers

[CL 14819956 by Johan Berg in ue5-main branch]
2020-11-30 06:05:56 -04:00
Martin Ridgers
f3c10ba0ef Capture the very last tail of alloc/free events
#rb jb
#rnx

[CL 14819843 by Martin Ridgers in ue5-main branch]
2020-11-30 05:00:46 -04:00
Martin Ridgers
7e7c06d114 Replaced some magic constants with something semantic and asserted the expected properties.
#rb jb
#rnx

[CL 14819789 by Martin Ridgers in ue5-main branch]
2020-11-30 04:20:25 -04:00
Martin Ridgers
1e770a733e Wrapped a few pieces of code in #if/defs that qwew related only to the disabled memory overview tracing.
#rb jb
#rnx

[CL 14819762 by Martin Ridgers in ue5-main branch]
2020-11-30 03:57:20 -04:00
Martin Ridgers
42746708dc Reallocs need to be two separate free and alloc events. Previously another thread could reuse the address freed by the Realloc() call before the single realloc trace event was traced. This causes dissonance in the trace event stream that become impossible to reason.
#rb jb
#rnx

[CL 14812566 by Martin Ridgers in ue5-main branch]
2020-11-25 07:34:09 -04:00
Martin Ridgers
6c8b77f580 Fixed missing owner fields. Remove owner field from Free trace events to keep the size down (can be reinstated if need be, although preferably avoided as its very expensive).
#rb jb
#rnx

[CL 14812369 by Martin Ridgers in ue5-main branch]
2020-11-25 04:52:06 -04:00
Martin Ridgers
6db8d21bd2 Removed Waste field as it was wrong. Replaced it with the lower bits of the allocation size instead and packed it in spare alignment bits
#rb jb
#rnx

[CL 14812340 by Martin Ridgers in ue5-main branch]
2020-11-25 04:22:15 -04:00
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -04:00
Martin Ridgers
be972be826 Moved the Trace namespace into the UE namespace.
#rb jb
#rnx

[CL 14762673 by Martin Ridgers in ue5-main branch]
2020-11-17 06:54:28 -04:00
Martin Ridgers
ee5250cb77 Off-by-one error when parsing command line arguments.
#rb jb
#rnx

[CL 14750373 by Martin Ridgers in ue5-main branch]
2020-11-16 05:16:07 -04:00
Johan Berg
c9f6237830 Output owner
[CL 14651301 by Johan Berg in ue5-main branch]
2020-11-04 06:51:49 -04:00
Johan Berg
605593dd00 Static analysis fixes
#jira UE-102442, UE-102438
#rb martin.ridgers

[CL 14651299 by Johan Berg in ue5-main branch]
2020-11-04 06:51:27 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
Marc Audy
7e61eaf295 Fix header guards
#fyi Johan.Berg, Joji.Tsuruga

[CL 14602138 by Marc Audy in ue5-main branch]
2020-10-28 15:03:04 -04:00
Martin Ridgers
af50a767ce Fixed ClangEditor compile error
#rb johan.berg

[CL 14601194 by Martin Ridgers in ue5-main branch]
2020-10-28 13:44:54 -04:00
Rolando Caloca
2526353b5e UE5 - NonUnity compiler fix
#rb trivial
#jira UE-101511

[CL 14589749 by Rolando Caloca in ue5-main branch]
2020-10-27 13:38:50 -04:00
Johan Berg
c75d3ea6d5 Remove pragma optimize macro
#rb none

[CL 14587531 by Johan Berg in ue5-main branch]
2020-10-27 10:52:53 -04:00
Johan Berg
f049dcf72f Memory tracing.
* Trace all allocation events on channel "MemTrack"
* Index all loaded modules and traces on "Diagnostics" channel.
* Trace all unique callstacks on channel "Callstacks".

#rb martin.ridgers

[CL 14586994 by Johan Berg in ue5-main branch]
2020-10-27 09:55:01 -04:00
Martin Ridgers
889b2d647c Implementation of Trace's important events. Some events are only traced once. CPU scope names or log format strings for example. Those trace-once events get lost if a user then connects to trace late (or reconnects a second time). To combat that important events are traced to a separate stream internally so that they can be identified, cached off to one side, and resent when a connection is first established.
#rb johan.berg
#rnx

[CL 14572080 by Martin Ridgers in ue5-main branch]
2020-10-26 03:29:23 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
geoff evans
13d705fba1 Profiler updates
1) Fix Visual Studio Profiling PerfAPI build script pathing for modern era of Visual Studio, add IDEDir to UBT for base path of PerfAPI lib/headers

2) Add initial support for Superluminal instrumentation API, if it's installed and -Superluminal is passed on the command line. Dial back color saturation a bit to go easier on the eyes (my eyes!!). This is WIP support, we are technically violating the API rules by feeding in changing strings to the same profile marker. So, with this change you can see the instrumentation markers in the timeline, but using all the event features in Superluminal causes weird artifacts like event strings changing as you use profiler features. Subsequent change will attempt to pry apart static and instance string data in the instrumentation, as this is a common trope across profilers (and non-PC platforms).

Updated FExternalProfiler API to forward along color information from the instrumentation. This is a minor breaking change as it's very unlikely there are direct callers of these APIs.

[CL 14321510 by geoff evans in ue5-main branch]
2020-09-15 14:26:08 -04:00
Arciel Rekman
cb998fe373 Remove unused private fields - Automation
#rb Andrew.Grant
#review-14242502 @Andrew.Grant
#jira none

[CL 14243816 by Arciel Rekman in ue5-main branch]
2020-09-02 09:24:31 -04:00