Commit Graph

308 Commits

Author SHA1 Message Date
martin ridgers
dc2a0bfe13 An implementation of LaunchUnrealTrace() for POSIX platforms (currently disabled).
#rb jb
#preflight 6139c15648e495000141820c
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17469929 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17469934 by martin ridgers in ue5-release-engine-test branch]
2021-09-09 05:37:16 -04:00
martin ridgers
9a4471d2d6 Clarified that the shwon return value is in hexadecimal
#rb jb
#preflight 6139c15648e495000141820c
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17469908 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17469914 by martin ridgers in ue5-release-engine-test branch]
2021-09-09 05:36:27 -04:00
martin ridgers
b33b869a1d Swapped to a string-builder and adding missing TEXT() decoration around some literals
#rb jb
#preflight 6139c15648e495000141820c
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17469873 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17469885 by martin ridgers in ue5-release-engine-test branch]
2021-09-09 05:35:19 -04:00
martin ridgers
54d5ea36ea -traceshowstore to pop up the store server in its own console window. Useful for debugging.
#rb jb
#preflight 6139c15648e495000141820c
#rnx

#ROBOMERGE-AUTHOR: martin.ridgers
#ROBOMERGE-SOURCE: CL 17469847 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17469879 by martin ridgers in ue5-release-engine-test branch]
2021-09-09 05:35:03 -04:00
robert millar
eef73ebc8b Insights changes:
Make memory tag specs important so they don't get dropped before a trace connection is made.
Prevent Insights from crashing when opening a trace missing memory scopes or with missing scope specs.
Add a tooltip to symbol resolution noting the environment variable for symbol paths.
Allow Insights to capture full callstacks (including system modules) with the define UE_CALLSTACK_TRACE_FULL_CALLSTACKS or the command line argument -tracefullcallstacks on Windows.

#jira none
#rb ionut.matasaru, martin.ridgers

#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 17461782 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[bot1]: Dev-EngineMerge

[CL 17461823 by robert millar in ue5-release-engine-test branch]
2021-09-08 15:02:01 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
jason hoerner
110bd98b0a UE5: Optimizations when memory tracing is enabled: 5x perf increase with -llmcsv, 8x perf increase with -trace=memory.
#rb matt.peters johan.berg ionut.matasaru brandon.dawson jason.nadro
#rnx

Over half the perf gain was from reducing critical section locks, with the rest of the gains split between an optimization to call stack traversal (caching return address lookups in a lock free map), and enabling TLS related optimizations for MallocBinned2, which were inadvertently disabled when tracing was enabled (this also saves some locks).  Multiple lock types had to be optimized before measurable perf gains were observed, due to contention on remaining locks increasing as the first few locks were removed.  A total of 6 types of locks were removed or reduced:  AnnounceFNameTag, MallocBinned2, TagDataNameMap, Enum tag data lookup, Windows callstack trace, LLMMap.

* Added hash table utility class TGrowOnlyLockFreeHash which supports lock free reads, writes using a critical section, and no deletion.  This is intended for classes that represent caches of one-time initialized debug data used during memory tracing, which never needs to be freed.
* TGrowOnlyLockFreeHash applied to 4 sets/maps used when memory tracing is enabled, including tag data, announced tag names, call stack functions, and call stack IDs.
* Lock striping added to LLMMap.  This isn't a good candidate for a lock free approach, as it has a heavy amount of modification, and lock free approaches tend to perform worse than lock striping in that case, plus it would be a massive undertaking to make this lock free.
* A future lock to be removed would be the one in "FLowLevelAllocInfo::GetTag", protecting the "FLowLevelMemTracker::TagDatas" array, saving a couple percent more perf.
#preflight 6132a3a6bf137d00019a8c97

#ROBOMERGE-SOURCE: CL 17428762 via CL 17429451
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17429480 by jason hoerner in ue5-release-engine-test branch]
2021-09-03 20:58:47 -04:00
martin ridgers
9f66dcf36f Be explicit about the "fork" argument when launching the trace store server. Previously it was implicit preventing the addition of useful help text to anyone who ran the store binary explicitly. The process is also launched "detached" so that it can be in the console sub-system without popping up conhost terminals.
#rb johan.berg
#rnx
#preflight 6130519c79ce170001a93958

#ROBOMERGE-SOURCE: CL 17398147 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17398149 by martin ridgers in ue5-release-engine-test branch]
2021-09-02 01:46:57 -04:00
andrew firth
dfa71b7e39 [CSV] - add ExtendedUsedMB to the CSV output as a measure of the amount of extended memory currently in use.
[at]Ben.Woodhouse [at]Dave.Barrett
#rb Ben.Woodhouse
[FYI] nick.bullard
#preflight 612f969f6256b1000112e844

#ROBOMERGE-SOURCE: CL 17388268 via CL 17389243
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17389309 by andrew firth in ue5-release-engine-test branch]
2021-09-01 13:12:36 -04:00
martin ridgers
8ebbdc18f2 Specifying additional space for a traced event was only necessary if an event had an "attachment" (an arbitrary unstructured blob of data, "<< EventName.Attachment(...)"). Attachments were removed in 17080821. While the API wasn't updated at the time for transition purposes, it soon will be. (Note there is one slightly confusing element here which is that _important_ events do need to have a size specified due to the way they are buffered internally. The ThreadName events here however are not marked important).
[FYI] martins.mozeiko

#ROBOMERGE-SOURCE: CL 17365981 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17365987 by martin ridgers in ue5-release-engine-test branch]
2021-08-31 07:39:38 -04:00
martins mozeiko
dccdd9401b Collect process name & id for threads in context switches capture for Insights
#rb Ionut.Matasaru

#ROBOMERGE-SOURCE: CL 17323711 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17323725 by martins mozeiko in ue5-release-engine-test branch]
2021-08-26 14:51:46 -04:00
martins mozeiko
7343e55d12 Enable Windows ETW (context switches and stack sampling) and memory tracing on XSX.
Use Perf trace for context switches and stack sampling on PS4 and PS5.

#rb Ionut.Matasaru

#ROBOMERGE-SOURCE: CL 17277312 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218)

[CL 17277323 by martins mozeiko in ue5-release-engine-test branch]
2021-08-23 17:40:14 -04:00
martins mozeiko
971132629e Add missing include for non unity build
#rb Ionut.Matasaru

#ROBOMERGE-SOURCE: CL 17141217 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17141245 by martins mozeiko in ue5-release-engine-test branch]
2021-08-11 15:42:39 -04:00
martins mozeiko
f12af98ed8 Enabled memory tracking with callstacks for PS4/5
Implementation details:
- PS4 & PS5 uses dwarf symbol format and uses Syms symbol resolver.
- To resolve symbols the path to folder where .self file is built currently must be specified in UE_INSIGHTS_SYMBOL_PATH env variable for Insights.
- Multiple paths can be separated by ; in this variable.
- Build for PS5 does not seem to have PLATFORM_PS5 define, I used defined(__PS5__).
- PS5 runtime collects and sends callstacks, but Syms resolver does not support dwarf v5 format yet, which is used on PS5 toolchain.

#rb none
#preflight 6112ead49c7bb10001bc63fc

#ROBOMERGE-SOURCE: CL 17128247 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17128270 by martins mozeiko in ue5-release-engine-test branch]
2021-08-10 20:07:09 -04:00
charles bloom
6c848f7923 fix read out of bounds in Trace startup
caused crash with -stompmalloc

#rb martin.ridgers

#ROBOMERGE-SOURCE: CL 17107919 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v854-17104634)

[CL 17107963 by charles bloom in ue5-release-engine-test branch]
2021-08-09 17:21:25 -04:00
martin ridgers
2d66273c3f Corrected a spelling mistake.
#ROBOMERGE-SOURCE: CL 17080823 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17080824 by martin ridgers in ue5-release-engine-test branch]
2021-08-06 04:44:36 -04:00
martin ridgers
8f8bbe3940 It is possible that the trace store server binary legitimately doesn't exist. While it is still useful to inform the user that the store couldn't be started, it has be downgraded to a normal log message instead of a warning.
#jira UE-120128
#rnx

#ROBOMERGE-SOURCE: CL 17067220 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17067232 by martin ridgers in ue5-release-engine-test branch]
2021-08-05 09:00:55 -04:00
martin ridgers
beeff75d5b There is no guarantee that BinPath ends in a path separator. It is thus more robust to prefix a separator to paths appended to BinPath (two or more subsequent separators is valid and counts as a single separator).
#rnx

#ROBOMERGE-SOURCE: CL 17065128 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17065131 by martin ridgers in ue5-release-engine-test branch]
2021-08-05 03:56:15 -04:00
martin ridgers
e39cf135f4 Load and platform-file tracing migrated away from attachments.
#rb cm
#rnx

#ROBOMERGE-SOURCE: CL 17048386 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17049897 by martin ridgers in ue5-release-engine-test branch]
2021-08-04 09:33:37 -04:00
martin ridgers
a0fd56f78d Convert Stats and Csv tracing to use array/string type trace event fields instead of attachments
#rb cm
#rnx

#ROBOMERGE-SOURCE: CL 17048347 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17048351 by martin ridgers in ue5-release-engine-test branch]
2021-08-04 08:03:55 -04:00
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
catalin dragoiu
1592fb316d Fix non unity compile error
#rb trivial

#ROBOMERGE-SOURCE: CL 16994685 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16994707 by catalin dragoiu in ue5-release-engine-test branch]
2021-07-29 08:54:51 -04:00
martin ridgers
0f2da8a9cb Removed use of trace event attachments to send the packed CPU enter/exit timestamps in favour of an array-type field.
#rb cm
#rnx

#ROBOMERGE-SOURCE: CL 16981291 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16981292 by martin ridgers in ue5-release-engine-test branch]
2021-07-28 08:27:29 -04:00
martin ridgers
9afd102458 Changed bookmarks trace events with an array-type field instead of using attachments.
#rb cm
#rnx

#ROBOMERGE-SOURCE: CL 16981262 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16981279 by martin ridgers in ue5-release-engine-test branch]
2021-07-28 08:25:14 -04:00
joe kirchoff
aae5a7c00f Remove reference to unused header AtomicQueue/AtomicQueue.h. Make it a simple external module in case anyone needs it in the future
#rb trivial
#rnx
#preflight 61009082431c7800012fcdd3

#ROBOMERGE-SOURCE: CL 16977624 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16977626 by joe kirchoff in ue5-release-engine-test branch]
2021-07-27 21:17:36 -04:00