Commit Graph

505 Commits

Author SHA1 Message Date
Johan Berg
b22fd87d5d Change TraceAuxilliary internal management of tracing status and trace destination
* Removed internal state tracking connection status. This was causing many problems because connections could be severed inside TraceLog without TraceAuxiliary knowing about it causing a mismatch in state.
* Wrapped trace destination and connection type state in struct and added guards for thread safety.
* Deprecated method to access trace destination as char array.
#preflight 647721f9947ff6973c8b4bb0

[CL 25699206 by Johan Berg in ue5-main branch]
2023-05-31 06:51:39 -04:00
Johan Berg
2a0a9d8ec7 Disable internal trace store for all platforms.
Standalone servers have been submitted for all desktop platform. Disable hosted trace store everywhere and enable launching of the server.

#rb ionut.matasaru
#preflight 64749db03535a898de7c1983

[CL 25663303 by Johan Berg in ue5-main branch]
2023-05-29 08:52:39 -04:00
steve robb
ba1fe48aca Preparation for deprecating the hashing arrays and strings by pointer - now you have to be explicit and call the right function for hashing a pointer, hashing an array contents or hashing a TCHAR* pointer as a null-terminated string.
Added GetArrayHash() for hashing arrays by their contents.
Added a new pair of keyfuncs for TSets and TMaps which allow TCHAR* keys (or TCHAR* values passed to *ByHash functions) to be hashed by FCrc::Strihash_DEPRECATED().

#rb devin.doucette
#preflight 64708e7c296b2b37c6fd894a

[CL 25647216 by steve robb in ue5-main branch]
2023-05-26 12:51:39 -04:00
mickael gilabert
4a488a2b6e Added FTraceAuxiliary::Panic that disables all channels without logging. Needed on some platforms to make sure no trace code will be executed in their crash handling code
[REVIEW] [at]johan.berg
#rnx
#preflight 646261bacf788a25583d6d45

[CL 25480438 by mickael gilabert in ue5-main branch]
2023-05-15 17:09:10 -04:00
Johan Berg
fc90e54b74 Expose is connected in interface
Exposes a variant of the the IsConnected method that also outputs the current session and trace guid. Also prints the current session and trace guids in the status message.

#rb martin.ridgers
#rnx
#preflight 6458b30e9f47682963d55ad4

[CL 25368367 by Johan Berg in ue5-main branch]
2023-05-08 04:46:26 -04:00
Steve Robb
c1216b9280 Replaced some operator TArray new usage - enough to make BlankProgram compile if operator new is deprecated.
#rb james.hopkin
#jira none
#preflight 6452372a0722d4f6a2d71e8e

[CL 25315828 by Steve Robb in ue5-main branch]
2023-05-03 07:02:43 -04:00
ben woodhouse
534eef816f Fix -csvCategories commandline option not working when multiple categories are specified
[CL 25305735 by ben woodhouse in ue5-main branch]
2023-05-02 14:43:48 -04:00
robert millar
1e3b40f1fd Allow setting external profiler with environment variable UE_EXTERNAL_PROFILER
#rb none

[CL 25241628 by robert millar in ue5-main branch]
2023-04-28 17:13:39 -04:00
robert millar
04d707b190 Move CPUPROFILERTRACE_FILE_AND_LINE_ENABLED to cpp file so it can be toggled without a full rebuild
#rb ionut.matasaru,johan.berg

[CL 25192000 by robert millar in ue5-main branch]
2023-04-25 19:19:56 -04:00
Johan Berg
e8f6b215c2 Allow overriding session guid for trace
#rb martin.ridgers
#preflight 6447ca8d024bc608e630618f

[CL 25178861 by Johan Berg in ue5-main branch]
2023-04-25 09:01:46 -04:00
ionut matasaru
c04fc14767 Removed the deprecated MemoryProfiler runtime:
* Removed code switched by USE_MALLOC_PROFILER.
* Removed the USE_MALLOC_PROFILER define and the MALLOC_PROFILER macro.
* Removed PLATFORM_RUNTIME_MALLOCPROFILER_SYMBOLICATION define.
* Removed FMallocProfilerEx and FMallocProfilerEx wrappers and the GMallocProfiler global variable.
* Removed console commands: "MPROF", "DUMPALLOCSTOFILE", "SNAPSHOTMEMORY" and "SNAPSHOTMEMORYFRAME".
Please use Unreal Insights (Memory Insights; -trace=memory) instead.

#jira UE-141779
#rb Johan.Berg
#preflight 6437f5dd00398d6f88b5b18f

[CL 25101805 by ionut matasaru in ue5-main branch]
2023-04-19 04:07:55 -04:00
ben woodhouse
8d96709ed3 Add a OnCSVProfileEndFrame delegate, called only when the CSV profiler is running.
[CL 25049314 by ben woodhouse in ue5-main branch]
2023-04-14 16:35:54 -04:00
Johan Berg
2c9dbf4c17 Add project field seperate to app name
Previously we used project name rather than app name if it was available. However app name is needed to look up target binary is certain cases.

#rb ionut.matasaru
#jira UE-138503
#preflight 6437fa7feb6cd0e63af26946

[CL 25023785 by Johan Berg in ue5-main branch]
2023-04-13 09:02:26 -04:00
ben woodhouse
90d3f15fd4 CSVProfiler - duplicate start/stop capture hardening
- Detect duplicate start/stop capture requests. If a Start or Stop request is already pending as the next command in the queue, disregard repeat requests and emit a warning. This avoids an edge case where duplicate EndCapture calls would cause old metadata to be emitted
- Add IsEndCapturePending() method so calling code can check if there's a pending EndCapture before calling EndCapture (instead of just checking IsCapturing, which will be true if an EndCapture is pending).

[CL 25018952 by ben woodhouse in ue5-main branch]
2023-04-12 19:30:16 -04:00
nuno leiria
bddc67c947 Allow TargetFrameRateOverride to be set early because execcmds come in too late.
#rb trivial
#preflight none

[CL 24943742 by nuno leiria in ue5-main branch]
2023-04-06 09:54:40 -04:00
robert millar
097dc44df1 Disable stall detector when debugging.
Fix passing backtrace to stall detected delegate.

#rb none

[CL 24920972 by robert millar in ue5-main branch]
2023-04-04 19:20:26 -04:00
robert millar
8598e0e047 Stall detector refactor
- Minimize duration of locks around FStallDetector and FStallDetectorStats instances
- Remove some public access to FStallDetector and FStallDetectorStats instances and synchronization around them
- Remove Stat from UE::FStallDetectorStats::TabulatedResult for thread safety in case of stat lifetime ending (e.g. thread shutdown)
- Fire callbacks & call ReportStall outside of locks
- Add backtrace to stall detected callback
- Only fire 'stall detected' from background thread, only fire 'stall completed' from stalling thread
- Change delegates to threadsafe versions
- Add checks for length of stall scope name
- Execute ReportStall in a task

#rb francis.hurteau,logan.buchy
#jira UE-179587

[CL 24920944 by robert millar in ue5-main branch]
2023-04-04 19:19:41 -04:00
ionut matasaru
efd620e3db Fixed ASan alloc-dealloc-mismatch for TCounters with dynamic name. Also fixed the case where id for a counter with dynamic name is correctly initialized in constructor (no string copy is allocated, but destructor was attempting to free the name string).
#jira UE-182242
#rb trivial
#rnx
#preflight 642c5b1f1d19c0312ac7bd2c

[CL 24914065 by ionut matasaru in ue5-main branch]
2023-04-04 13:51:09 -04:00
ionut matasaru
4a80dc42f1 [Insights] CountersTrace: Added explicit support for counters with dynamic name.
#jira UE-181611
#rb Johan.Berg
#preflight 64268ffa38075fa13f2eaf2f

[CL 24869338 by ionut matasaru in ue5-main branch]
2023-03-31 07:26:59 -04:00
danny couture
2272d98f45 Fix race in OutputBeginDynamicEvent
#rnx
#rb Ionut.Matasaru
#preflight trivial

[CL 24866126 by danny couture in ue5-main branch]
2023-03-30 22:33:31 -04:00
ben woodhouse
bcd6d8d5b8 CsvProfiler - add logging when categories are enabled/disabled via the commandline and
- call EnableCategoryByName when processing the commandline rather than duplicating that logic

[CL 24843368 by ben woodhouse in ue5-main branch]
2023-03-29 15:23:22 -04:00
ionut matasaru
60cd980cd0 [Insights] Fix late connect for the Counters trace channel.
#jira UE-181016
#rb Johan.Berg
#preflight 6421b64d7703a8de3da002a6

[CL 24820422 by ionut matasaru in ue5-main branch]
2023-03-28 11:55:43 -04:00
ionut matasaru
3c9f5c9e0b Added explict MemoryTrace_UnmarkAllocAsHeap trace events for VirtualFree() API (to match the MemoryTrace_MarkAllocAsHeap events).
#rb Johan.Berg
#preflight 64020dc9aa00423335b40e4d

[CL 24731645 by ionut matasaru in ue5-main branch]
2023-03-21 10:14:11 -04:00
logan buchy
3d7aaddad3 A subsystem to bubble up notifications from the StallDetector
* The subsystem adds a new toolbar widget in the level editor which changes to a notified state when a stall is detected.
* Clicking the widget brings up a tab with a table of the detected stall history.  Each stall has some information that can be copied to a clipboard for users to dump the data into a issue ticket or chat message.
* NOTE: Currently iconography is all placeholders. Need UX pass to improve.

#jira UE-174529
#rb Brooke.Hubert
#preflight 6414f70632723d4a2081491c
#preflight 64189fb032723d4a204d20ac

[CL 24724541 by logan buchy in ue5-main branch]
2023-03-20 17:36:50 -04:00
Matt Peters
0027082473 RequestExit Feedback: Add Callsite argument to FPlatformMisc::RequestExit
Add the argument to many but not all callsites.
#jira FORT-578919
#rnx
#rb Devin.Doucette
#preflight 6414ca9d691c5ebc15b30410

[CL 24696053 by Matt Peters in ue5-main branch]
2023-03-17 16:46:34 -04:00