Commit Graph

269 Commits

Author SHA1 Message Date
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
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
robert millar
315d3013c6 Fix mismatched block comment.
#rb none

[CL 24920947 by robert millar in ue5-main branch]
2023-04-04 19:19:47 -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
d05eeabdc2 Added comment about expected write size for FTraceUtils::Encode7bit
#rb trivial
#rnx
#preflight none

[CL 24871110 by ionut matasaru in ue5-main branch]
2023-03-31 10:29:43 -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
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
leigh mcrae
f79f51b101 Moves untracked memory coming from the third party Eigen library into the UE allocators, making it trackable.
- Originally was added in CL24689238 but had to be removed for Static Analysis violation of an external file including a non-external file.
  - Added EIGEN_UE_OVERRIDE_ALLOCATORS that define EIGEN_STD_MALLOC and EIGEN_STD_FREE.
  - Moved FORCE_ANSI_ALLOCATOR from UMemoryDefines to Build.h because it needs to be defined earlier, also this seems to be where other defines like this live.

  - Also tried to use stubs I made in Core but it had problems with CORE_API.
    - Some builds were having problems with order and CORE_API was being defined to DLLIMPORT but DLLIMPORTwasn't always defined yet.

  - New version actually follows the pattern used to override the new operators by using the module boilerplate macro.
    - This will insert a copy of the stub function into each module which is fine since there will only be one version of FMemory.

#tests Built pretty much all targets (as non-unity also). Tested that allocations were going through the stub in Win64. Did as many Horde targets as I could.
[REVIEW] [at]dmytro.vovk [at]robert.millar [at]alex.nischwitz

[CL 24772972 by leigh mcrae in ue5-main branch]
2023-03-23 21:43:32 -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
Johan Berg
44a07fc101 Add package field to asset metadata tracing.
Add a package field to the asset metadat scope, in addition to the existing asset name and object class fields.

#rb ionut.matasaru, josie.yang
#jira UE-157322
#preflight 64130a87a62aae9c87fa4c19
#preflight 641321e2760ee6afab7829b1

[CL 24670895 by Johan Berg in ue5-main branch]
2023-03-16 10:29:26 -04:00
ionut matasaru
33788a9f5c [Insights] MetadataTrace: Added UE_TRACE_METADATA_RESTORE_SCOPE(MetadataId) macro. Also did minor fixes to comments and code style.
#rb none
#fyi Johan.Berg
#preflight 6410974a924023147d3e69eb

[CL 24639983 by ionut matasaru in ue5-main branch]
2023-03-14 13:53:45 -04:00
Josie Yang
0c57354914 Insight asset meta data tracking on DX12 textures
#jira UE-167815
#rb ionut.matasaru, Kenzo.Terelst
#preflight 640634663206d45d202411c5

[CL 24610626 by Josie Yang in ue5-main branch]
2023-03-13 07:12:41 -04:00
Sebastian Thomeczek
dc2cf85e53 [Insights] Update Regions code to use custom trace events instead of hijacking regular bookmarks
#rb Ionut.Matasaru
#jira UE-148203
#preflight 64072d276e1dadfcda7352c9
#preflight 640731e4ba12ba641681363a

[CL 24538562 by Sebastian Thomeczek in ue5-main branch]
2023-03-07 08:00:11 -05:00
tyler staples
bf09d60d6b Add non-persistent metadata to the CsvProfiler.
By default csv metadata persists between captures which may be problematic if capturing different modes that have specific metadata since prior captures can pollute future ones.
This change adds a CSV_NON_PERSISTENT_METADATA macro which sets metadata that is cleared once the current capture ends.

For sake of review I've included the change to the FortLevelSaveComponent to update the creative metdata to use this macro. This will be submitted separately though.

#rb ben.woodhouse
[FYI] andrew.ladenberger

[CL 24436772 by tyler staples in ue5-main branch]
2023-02-27 20:55:32 -05:00
jian ru
a068006c5d Generalized templates for allcoation recording to and playback from log files
#rb dmytro.vovk, ben.woodhouse

[CL 24175227 by jian ru in ue5-main branch]
2023-02-13 10:38:26 -05:00
Johan Berg
2b44a347bb Fix for metadata scopes applied in tasks.
When launching a task, the metadata stack is captured at the calling site, and reapplied as a scope as soon as the task begins to execute. The macro that performed this reapplication was misnamed and didn't imply that it was actually creating a scope. This change removes the macro and adds a custom scope type which can be embedded in the inherited context for the task.

#rb ionut.matasaru, andriy.tylychko
#jira UE-167069
#preflight 63e64e153c247ccd13e986e4

[CL 24118353 by Johan Berg in ue5-main branch]
2023-02-10 09:31:37 -05:00
QFSW
54c0bafbc6 PR #9886: Fixed linker error when using operator+ in FResourceSizeEx outside of Core (Contributed by QFSW)
#github https://github.com/EpicGames/UnrealEngine/pull/9886
#preflight 63dd3484244dc45a20976474

[CL 23991897 by QFSW in ue5-main branch]
2023-02-03 11:40:36 -05:00
catalin dragoiu
83deb26fb5 Fix snapshot bugs in Insights Status Bar Widget.
#rb Ionut.Matasaru
#jira UE-175267,UE-175284,UE-175356
#preflight 63d7ea2fec3d1af4409128d3
#lockdown mark.lintott

[CL 23951418 by catalin dragoiu in ue5-main branch]
2023-02-01 12:28:50 -05:00
steve robb
ad6364e24e Replaced some enable-if/disable-if overloads with if constexpr blocks in a single function.
#rb devin.doucette
#preflight 63d45377f626715201acf9cb

[CL 23897639 by steve robb in ue5-main branch]
2023-01-27 23:12:19 -05:00
steve robb
38612a3e15 Removed TRemoveCV usage.
#rb devin.doucette
#preflight 63d3f7005c69f453c12698ee

[CL 23890475 by steve robb in ue5-main branch]
2023-01-27 15:19:12 -05:00
danny couture
74782129ec Fix race in FCounters used in FileSystemCacheStore and AsyncLoading
#rnx
#rb Devin.Doucette
#preflight 63d1d57e6a14d8406d8fc7d4

[CL 23863764 by danny couture in ue5-main branch]
2023-01-25 21:07:51 -05:00
Johan Berg
b0ba00dce1 Properly implement snapshot to server in Insights status bar
#preflight 63d12034033e457ba8c659af

[CL 23846388 by Johan Berg in ue5-main branch]
2023-01-25 07:35:06 -05:00
ionut matasaru
8dcfca1aea [Insights]
- MemoryTrace: Added CallstackId for all free events and also for HeapMarkAlloc, HeapUnmarkAlloc events.
  - MemoryTrace: Increased trace version to 2.

#rb Johan.Berg
#preflight 63cab54dee564281cdc111bf

[CL 23790801 by ionut matasaru in ue5-main branch]
2023-01-20 11:12:39 -05:00
Catalin Dragoiu
4993a1a079 Add Trace Bookmark and Trace Screenshot buttons to the Insigths Status Bar Widget.
#jira UE-161773
#rb Ionut.Matasaru
#preflight 639b28bbc16855964d64326e

[CL 23527321 by Catalin Dragoiu in ue5-main branch]
2022-12-15 10:15:25 -05:00