Commit Graph

494 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
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
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
joakim trossvik
03a7e206da Add a new way of changing how CSVProfiler sets the Target frame rate.
Used CVars to avoid pulling the ApplicationCore module into Core.
#preflight 64103a54af3fc35292fccef4
#preflight 64105acfc41a0a2a771b867e

[CL 24634160 by joakim trossvik in ue5-main branch]
2023-03-14 09:21:00 -04:00
devin doucette
c75cf0ed41 StallDetector: Fixed a compile error
#rb none
#rnx

[CL 24564480 by devin doucette in ue5-main branch]
2023-03-08 14:26:24 -05:00
devin doucette
8d7eba0c61 StallDetector: Fixed shadowing error caused by a poorly scoped global
#rb none
#rnx

[CL 24564467 by devin doucette in ue5-main branch]
2023-03-08 14:25:38 -05: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
Johan Berg
a0d44a5237 Fix missing channel check for metadata restore scopes.
When creating the custom scope type, a check if the channel is active was missing causing the scopes to emit events regardless if the metadata channel was active.

#rb ionut.matasaru
#jira UE-178464
#preflight 63f8b471dd78dd50f66bbd55

[CL 24421297 by Johan Berg in ue5-main branch]
2023-02-27 06:43:17 -05:00
ionut matasaru
416b29771c [Insights] Fixed typo in warning message for SnapshotSend (trace command).
#rb trivial
#preflight 63e6627f8917c5deac736fa3

[CL 24119584 by ionut matasaru in ue5-main branch]
2023-02-10 10:43:24 -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
ionut matasaru
149f85440d [Insights] Fixed scope of metadata and mem tag for mem allocations made by the trace system (i.e. extends scope over the original allocator calls). So, heap allocations will inherit same "trace" tag.
#rb Johan.Berg
#preflight 63e646913d24a13d13b108c8

[CL 24117860 by ionut matasaru in ue5-main branch]
2023-02-10 08:42:47 -05:00
henrik karlsson
c8c3d0b8b2 [Core]
* Made code compatible with modules/header units. This includes following things:
   * Removed static in front of global functions/variables (static indicates it is hidden outside of module/header unit which is not what many places want...)
   * Moved dllexport from type to methods in order to get dllexport of static constexpr fields. This is supposed to work according to microsoft but since it is a good change I don't mind doing it anyway)
   * static constexpr -> static constexpr inline for member variables and methods (this makes them available outside module/headerunit)
   * Added HEADER_UNIT_IGNORE markup to includes that are circular
   * Added HEADER_UNIT_SKIP to files that can't compile by themselves

#preflight 63e2aeba3c44c83044bfcc75
#rb steve.robb

[CL 24066986 by henrik karlsson in ue5-main branch]
2023-02-08 00:25:15 -05:00