Commit Graph

553 Commits

Author SHA1 Message Date
ionut matasaru
c99672cda8 [Insights] CpuProfiler:
- Flushed the thread buffer (if not already empty) when the thread ends.
  - Added timestamp ("Cycle" field) to the "CpuProfiler.EndThread" event.
  - Removed unused "CpuProfiler.EndCaptureV2" event.

#rb Johan.Berg, Catalin.Dragoiu

[CL 30075996 by ionut matasaru in ue5-main branch]
2023-12-04 06:50:16 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
dmytro ivanov
472be09f89 Enable memory tracing on Android
#jira UE-200096
#rb ionut.matasaru, Johan.Berg

[CL 29637861 by dmytro ivanov in ue5-main branch]
2023-11-10 08:42:29 -05:00
matt peters
f4e0d54110 WindowsMemoryTrace: Fix compilation errors in _WIN32_WINNT>=0xA00.
#rnx
#rb Johan.Berg

[CL 29406189 by matt peters in ue5-main branch]
2023-11-03 10:32:53 -04:00
ionut matasaru
4fecb9d77e Fixed memory tracing for OnDllUnloaded (i.e. MemoryTrace_UnmarkAllocAsHeap needs to match the MemoryTrace_MarkAllocAsHeap).
#rb Catalin.Dragoiu

[CL 28836663 by ionut matasaru in ue5-main branch]
2023-10-17 08:35:00 -04:00
johan berg
89ee1ba3a4 Don't try to auto-connect when already connected
Trace auto-connecting did not check current state before trying to connect, causing an error to be emitted.

#rb ionut.matasaru

[CL 28412382 by johan berg in ue5-main branch]
2023-10-03 09:45:26 -04:00
johan berg
61c28e1623 Add failsafe for memory tracing on Windows
Adds an extra check when looking for functions on callstack tracing on Windows. This issue has been observed on Clang compiled targets. Thanks to phisko for PR.

#rb martin.ridgers

[CL 28409873 by johan berg in ue5-main branch]
2023-10-03 07:40:00 -04:00
steve robb
a84e22104b Replaced GET_VARARGS* macros with GET_TYPED_VARARGS*.
#rb james.hopkin
#jira UE-194628

[CL 28346416 by steve robb in ue5-main branch]
2023-09-29 13:00:07 -04:00
danny couture
87115fc8bf Add flush feature to CpuProfiler that can be used before entering a long single operation like a wait that could be missed in UnrealInsights in case of deadlock
#rnx
#rb Ionut.Matasaru

[CL 28315289 by danny couture in ue5-main branch]
2023-09-28 08:40:04 -04:00
johan berg
ea1c4720e2 Reenable auto-start of UnrealTraceServer on Mac
#rb ionut.matasaru
#jira UE-188183

[CL 27883401 by johan berg in ue5-main branch]
2023-09-14 12:42:43 -04:00
catalin dragoiu
36583085d6 [Insights] Add a new persistent setting "Auto Connect" to the Session Browser page that controls if the Editor and Game should auto connect and start tracing if Insights Session Browser is open.
#jira UE-194404
#rb Ionut.Matasaru

[CL 27801419 by catalin dragoiu in ue5-main branch]
2023-09-12 14:32:03 -04:00
tyler staples
6eb4cc07c1 CsvProfiler - Add end capture timestamp to the csv metadata.
This allows easily calculating capture duration by checking the delta between StartTimestamp and the new EndTimestamp. This is much faster than trying to calculate the duration by looking at all the frame times.

#rb ben.woodhouse

[CL 27461382 by tyler staples in ue5-main branch]
2023-08-29 15:39:45 -04:00
ionut matasaru
2a39bde8ba [Insights] MemoryTrace: Fixed GetDescriptiveName() for FMallocWrapper to report name of wrapped allocator. Also replaced few "checks" in the memory trace API with "checkSlow".
#rb Johan.Berg

[CL 27064641 by ionut matasaru in ue5-main branch]
2023-08-14 04:36:57 -04:00
ionut matasaru
1922df88da [Insights] Fixed memory tracing for virtual allocs to track allocations also when just MEM_COMMIT is used (with a nullptr address).
#rb Johan.Berg

[CL 27064618 by ionut matasaru in ue5-main branch]
2023-08-14 04:30:19 -04:00
johan berg
66a1eaea0b Remove UE_TRACE_ENABLED check
It should be possible to launch UTS without having tracing enabled in the application. This is important to allow that for example UnrealInsights can launch the trace server. With this the log messages has to be emitted on the LogCore channel, as the LogTrace only exists when tracing is enabled.

#jira UE-190571
#rb ionut.matasaru, catalin.dragoui
#lockdown mark.lintott

[CL 27029990 by johan berg in ue5-main branch]
2023-08-11 11:30:26 -04:00
david harvey
da9b5b86f5 Do not include PreWindowsApi.h / PostWindowsApi.h directly in code.
- mostly just replacing them AllowWindowsPlatformTypes.h / HideWindowsPlatformTypes.h
 - some other files had both Pre/PostWindowsApi.h and Allow/HideWindowsPlatformTypes.h, so just removed
 - some occasional include order changes.

#jira UE-152863
#rnx
#rb Devin.Doucette

[CL 26985385 by david harvey in ue5-main branch]
2023-08-10 03:34:53 -04:00
zack neyland
f093982240 CSVProfiler: Return -1 when hot reloading to prevent a crash on Mac/Linux.
#jira UE-190804

[CL 26953128 by zack neyland in ue5-main branch]
2023-08-09 08:49:23 -04:00
alex kahn
9c0da3e87c [Backout] - CL26925245 - CIS UE Error
[FYI] zack.neyland
Original CL Desc
-----------------------------------------------------------------
CSVProfiler: Return -1 when hot reloading to prevent a crash.

#jira UE-190804
#rb Tyler Staples

[CL 26928578 by alex kahn in ue5-main branch]
2023-08-08 16:09:43 -04:00
zack neyland
505da40573 CSVProfiler: Return -1 when hot reloading to prevent a crash.
#jira UE-190804
#rb Tyler Staples

[CL 26925876 by zack neyland in ue5-main branch]
2023-08-08 15:03:02 -04:00
ionut matasaru
423dbfeeaf [Insights] MemoryInsights: Fixed missing ProgramSize allocations for Unix platform.
#jira UE-191384
#rb none

[CL 26879438 by ionut matasaru in ue5-main branch]
2023-08-07 05:56:52 -04:00
ionut matasaru
1a996169e5 [Insights] CpuProfilerTrace:
- Enabled cpu scope tracing of object names (blueprints, functions) by default when app is not running as a commandlet (still requires "cpu" trace channel and -statnamedevents to be enabled). Enabling AssetLoadTime trace channel will enable tracing of object names also in commandlets (ex. cooking).
  - Improved performance when tracing "statnamedevents" cpu scopes (by using a new optimized code path that uses an FName stat id together with a TCHAR* descriptive name).

#rb Matt.Peters

[CL 26815377 by ionut matasaru in ue5-main branch]
2023-08-03 12:36:42 -04:00
catalin dragoiu
9dc1b51824 Disable launching of UnrealTraceServer from the Editor on Mac.
#rb Ionut.Matasaru
#jira UE-191107

[CL 26607864 by catalin dragoiu in ue5-main branch]
2023-07-26 11:08:22 -04:00
logan buchy
00b725427a Pause StallDetector when SlowTask is present
* A SlowTask is created when there is delibrately going to be a stall-like condition but the developer wants to retain some limited interactivity.  This is traditionally not considered a stall.
* This change will pause stall detectors when slow tasks are created and resume them when the slow task ends.
* Implementation uses a TLS variable to store SlowTask specific pause contexts so as to not put a dependency of SlowTasks on the StallDetector.  Thread local stack is used since SlowTasks can be created from any thread context and can also be recursively created - therefore the Start/Finalize SlowTask events can be fired from any thread and the number of pause contexts need to match the created slow tasks.

#rb Brooke.Hubert, Rex.Hill
#jira UE-179567

[CL 26583138 by logan buchy in ue5-main branch]
2023-07-25 14:33:43 -04:00
logan buchy
eac21cc8cd Add debug commands for SlowTask and StallDetector
* StallDetector gets StallDetector.ForceLogOnStall which will cause the editor to emit a log from the LogStall category at verbosity Log even if the StallDetector scope is set to disable reporting
* Editor.Debug.SlowTask.Simulate will cause the FEngineLoop::Tick to enter a SlowTask for the given number of seconds.
* Together, these can be used to validate that the StallDetector scope in FEngineLoop::Tick is triggered when a SlowTask runs past the detector's stall threshold time (2 seconds at time of writing)

#jira UE-179567
#rb Rex.Hill

[CL 26559492 by logan buchy in ue5-main branch]
2023-07-24 19:40:28 -04:00
logan buchy
490033eaff Revert commented out ensure in StallDetector
* Commented out during backout of previous change.  Should have still been intact.

#rb trivial
#jira UE-179567

[CL 26558878 by logan buchy in ue5-main branch]
2023-07-24 18:57:12 -04:00