Commit Graph

321 Commits

Author SHA1 Message Date
ben woodhouse
a3ce2a49de Refactor CsvProfiler begin/end capture - move capture start/end logic into dedicated functions to make the logic easier to maintain
- Add metadata for capture duration
#rb john.huelin

[CL 34484069 by ben woodhouse in ue5-main branch]
2024-06-18 18:47:02 -04:00
ben woodhouse
2ea61ce0c6 Switch to CSV_PROFILER_STATS instead of CSV_PROFILER for various profiling subsystems. This allows them to be compiled out when CSV_PROFILER_MINIMAL is defined.
As part of this change we also promote dynamic resolution and IO/PackageQueueDepth stats to Minimal since they're important for high level performance reporting.
Also fix up a few places that were redundantly using #if CSV_PROFILER around CSV macros.

#rb mickael.gilabert

[CL 34386798 by ben woodhouse in ue5-main branch]
2024-06-14 18:16:47 -04:00
ben woodhouse
39d5c72b3f CsvProfiler: add float and int overloads for RecordCustomStatMinimal
[CL 34378844 by ben woodhouse in ue5-main branch]
2024-06-14 14:25:40 -04:00
ben woodhouse
5280549418 Add CSV_PROFILER_MINIMAL define for removing almost all instrumentation overhead. Only a handful of essential stats are captured; the rest are stripped out at compile time. In this mode, the only function which emits stats to the CSV is RecordCustomStatMinimal (with corresponding macros CSV_CUSTOM_STAT_MINIMAL and CSV_CUSTOM_STAT_MINIMAL_GLOBAL).
#rb mickael.gilabert
#tests Tested locally with and without the new cvar

[CL 34374708 by ben woodhouse in ue5-main branch]
2024-06-14 12:30:08 -04:00
ionut matasaru
3d6c8cad4b [Insights] Extended the trace counter API (COUNTERSTRACE_ENABLED):
* Added bUnchecked template parameter to FCountersTrace::TCounter class.  When enabled, the values are traced even if it does not change.
  * Added UNCHECKED_* variants for all counter macros.
  * Added macros for inline atomic counters (TRACE_ATOMIC_INT_VALUE, TRACE_ATOMIC_MEMORY_VALUE).
  * Added TRACE_DECLARE_COUNTER(CounterType, CounterName, CounterDisplayName, CounterDisplayHint) API.
  * Added support for atomic float counters (FCounterAtomicFloat, TRACE_ATOMIC_FLOAT_VALUE, TRACE_DECLARE_ATOMIC_FLOAT_COUNTER, etc.).

#jira UE-216225
#rb Catalin.Dragoiu
[FYI] Johan.Berg

[CL 34118035 by ionut matasaru in ue5-main branch]
2024-06-05 03:46:42 -04:00
catalin dragoiu
9f2576ec27 Fix Settings system for the Trace Control Window.
#rb ionut.matasaru, Johan.Berg
#jira UE-215072

[CL 34030625 by catalin dragoiu in ue5-main branch]
2024-05-31 08:44:06 -04:00
johan berg
a2ef004c0f Allow use of TAG_TRACE when trace is disabled.
#rb johan.berg

[CL 34009798 by johan berg in ue5-main branch]
2024-05-30 15:08:49 -04:00
robert millar
df1e10047d Add new AUTORTFM macros which can be followed by braced blocks to make them work better with the debugger
e.g. UE_AUTORTFM_OPEN2{ ... code ... };

#rb neil.henning

[CL 33869184 by robert millar in ue5-main branch]
2024-05-23 14:22:32 -04:00
johan berg
0e7e066e2c Preset for "light" memory tracing
In some cases it could be useful to trace detailed allocations without callstack, and solely rely on tags for analysis. Enable by starting the process with `-trace=memory_light`.

#rb ionut.matasaru, dmytro.ivanov

[CL 33652379 by johan berg in ue5-main branch]
2024-05-15 03:43:13 -04:00
danny couture
f9d08a61d1 [CpuProfiler]
- Fix TSAN warning and provide a bit of context of why that race is perfectly fine.

#rnx
#jira UE-214255
#rb kevin.macaulayvacher

[CL 33571983 by danny couture in ue5-main branch]
2024-05-10 07:03:43 -04:00
michael nicolella
a7590be428 autortfm: proactive crash fixes guided by static analysis
- CheckVerifyFailedImpl2: flushing the output device uses atomics
- DumpStackTraceToLog: flushing the output device uses atomics

- BasicFatalLog: invokes several debug utilities to print diagnostics and shut down the process
- BasicLog: uses atomics when GConvertBasicLogToLogRecord is true

- IsEnsureAllowed: generic platform init stuff

- GetNamePool: static object initialization

- GetCurrentThreadCallstack: internally takes locks

- CsvProfiler: push/pop-style profiler

- MakeUniqueObjectName: use of atomics

#rb Brandon.Schaefer

[CL 33514601 by michael nicolella in ue5-main branch]
2024-05-08 11:23:59 -04:00
johan berg
8ee9d15fbe Trace message bus controls
Adds a control layer for Trace (TraceService) and a controller (TraceController) integrated into SessionServices. This allows remote control of trace over messge bus.

#rb Catalin.Dragoiu, ionut.matasaru, Josie.Yang

[CL 33260646 by johan berg in ue5-main branch]
2024-04-26 07:31:51 -04:00
ionut matasaru
170d71ccd5 [Insights] Added compile time validation for the format string passed to TRACE_BOOKMARK.
#jira UE-212691
#rb Catalin.Dragoiu

[CL 33098566 by ionut matasaru in ue5-main branch]
2024-04-19 06:02:45 -04:00
josh adams
eca6d6b781 - Benign engine changes that came from new platform experimentation
#rb Chris.Babcock

[CL 33037334 by josh adams in ue5-main branch]
2024-04-17 11:17:07 -04:00
henrik karlsson
68a17042aa [Core]
* Removed macro dependency from Core to CoreUObject in ScopedTimers.h. Added a dedicated macro instead to combine args

[CL 32498058 by henrik karlsson in ue5-main branch]
2024-03-26 01:35:24 -04:00
catalin dragoiu
ed536f57d6 Add support for exclusive time tracking for Insights Cooking Profiler metrics.
#rb ionut.matasaru
#jira UE-170866

[CL 32441597 by catalin dragoiu in ue5-main branch]
2024-03-22 14:04:04 -04:00
dmytro vovk
662c3bf55b Fixed thread unsafe static vars in CSV_SCOPED_TIMING_STAT_RECURSIVE
#rb ben.woodhouse
[FYI] joe.bestrotheray

[CL 32399088 by dmytro vovk in ue5-main branch]
2024-03-21 10:16:21 -04:00
ionut matasaru
37b8460820 [Insights]
- Removed function FChannel::EnumerateChannels deprecated since UE 5.2.
  - Fixed / updated comments for UE::Trace::FChannel class.
  - TraceAux: Made the warning message emitted when disabling a read only channel to be an error. Also update the error messages for enabling/disabling read only channels.
  - TraceAux: Fixed comments in TraceAuxiliary API.
  - TraceAux: Removed unused private function in TraceAuxiliary.
  - TraceAux: Minor refactoring / code cleanup.

#rb Johan.Berg

[CL 32248380 by ionut matasaru in ue5-main branch]
2024-03-14 12:28:28 -04:00
dmytro ivanov
d7e3046599 Unreal Insights support for tracing swap events
#jira UE-198367
#rb ionut.matasaru

[CL 31839388 by dmytro ivanov in ue5-main branch]
2024-02-27 09:39:44 -05:00
jordan cristiano
0b5d4dc060 Fixed csv metadata for NamedEvents not being set if namedevents was enabled after the csv capture starts.
#rb evgenii.babinets
[FYI] ben.woodhouse
#tests Win64 test client csv start/stop with stat namedevents/stop with stat namedevents

[CL 31494710 by jordan cristiano in ue5-main branch]
2024-02-14 16:43:22 -05:00
dmytro vovk
2c523f4899 Fixed default initialization of TLS slots to 0 and invalidity check against 0 as 0 is a valid TLS slot index
Attempt no. 2
#rb Francis.Hurteau, Matt.Peters

[CL 31123996 by dmytro vovk in ue5-main branch]
2024-02-02 09:59:30 -05:00
sean boocock
5a5ab2b7cd [Backout] - 31084550 - Blocking launching FN editor
[FYI] dmytro.vovk
Original CL Desc
-----------------------------------------------------------------
Fixed default initialization of TLS slots to 0 and invalidity check against 0 as 0 is a valid TLS slot index
#rb Francis.Hurteau, Matt.Peters

[CL 31088717 by sean boocock in ue5-main branch]
2024-02-01 11:00:01 -05:00
dmytro vovk
08c3036b27 Fixed default initialization of TLS slots to 0 and invalidity check against 0 as 0 is a valid TLS slot index
#rb Francis.Hurteau, Matt.Peters

[CL 31084584 by dmytro vovk in ue5-main branch]
2024-02-01 08:33:08 -05:00
david harvey
9376e9d141 Clean up UE_EXTERNAL_PROFILING_ENABLED for platform extensions
#jira UE-204162
#rnx

#rb Wojciech.Krywult

[CL 31046539 by david harvey in ue5-main branch]
2024-01-31 09:42:36 -05:00
catalin dragoiu
3382fb6278 Add Trace Pause/Resume menu entry to the Trace Editor Widget.
#rb ionut.matasaru
#jira UE-205279

[CL 31009421 by catalin dragoiu in ue5-main branch]
2024-01-30 11:51:24 -05:00