Repository navigation
feat(agc): report which trace threads dropped events and where their buffers filled - #5813
Conversation
|
I found an overlapping open PR: #5808 also adds |
|
Thanks @MarcZX100. I've agreed with #5808 that it carries |
758fdf9 to
a66efd6
Compare
758fdf9 to
a66efd6
Compare
|
Checked on current |
a66efd6 to
9aa54d7
Compare
…buffers filled The trace summary line keeps `trace_dropped` as before: true when any thread lost a slice, any thread's totals table was full, or the gpu track was full. When it is true, the line now also carries `trace_dropped_threads`, one entry per affected thread name, so the reader can tell which thread lost data and how much. Threads that share a name, such as the shader prepare threads, share one entry: losses are summed, the earliest fill is kept and totals_full is true if any is. Each entry has `events_full_after_s`, the seconds from the first present of the window to the start of the first lost slice. It is absent for `gpu` and in every summary line (windowed frames/seconds and APS5_TRACE_SUMMARY_EVERY) whenever the first lost slice starts outside the line's span of presents, including a slice whose scope began before the window opened or one lost after the last present. `events_lost` is the number of slices not recorded and is absent when 0; in interval lines it counts the buffer's losses since it started. `totals_full` is true when the thread's totals table overflowed, which makes the summary numbers incomplete; a thread with only `events_lost` has complete totals. The Chrome trace gets a `trace buffer full` instant event on a thread at the point where its buffer filled. BUILD.md documents the new fields and the event. `trace_dropped` is unchanged, and when nothing drops the default output is byte-identical to before. Refs boykopovar#5786 Depends on boykopovar#5808
9aa54d7 to
a533324
Compare
|
#5808 is merged, and this branch conflicted with |
What
Refs #5786. Depends on #5808, which adds
APS5_TRACE_EVENTS; this branch is #5808's commit plus one commit, and only the second is new here.trace_droppedsays that a trace lost data, but not which thread, from when, or whether the summary numbers are affected. When it is true, the summary line now also carriestrace_dropped_threads, one entry per affected thread name:events_full_after_s: seconds from the window's first present to the start of the first lost slice. Absent forgpu, and absent whenever that slice starts outside the line's span of presents.events_lost: slices not recorded (absent when 0). InAPS5_TRACE_SUMMARY_EVERYlines it counts the buffer's losses since it started.totals_full: the thread's totals table overflowed, so the summary numbers are incomplete. A thread with onlyevents_losthas complete totals.Threads that share a name, such as the shader prepare threads, share one entry: losses are summed, the earliest fill is kept, and
totals_fullis true if any of them is.The Chrome trace gets a
trace buffer fullinstant event on the thread where its buffer filled.trace_droppedis set on the same conditions as before, and when nothing drops the output is byte-identical. #5808's parser, bounds and buffer sizes are unchanged; sizing the shader prepare buffers fromAPS5_TRACE_EVENTSis left for a follow-up after #5808 lands.Overlap: #5046 edits the same lines of
PerformanceTrace.hpp; whichever lands second needs a rebase. #4969 and #5453 also touchdocs/dev/BUILD.md, different sections.Tested
Linux x86-64 (CachyOS, kernel 7.2.2), RTX 3080 Ti, NVIDIA 610.57.04.
agc_performance_trace(new cases: per-thread entries, same-named threads merged, the interval-line bounds ofevents_full_after_s, lost-event counts, totals overflow, the buffer-full event),ctest -R '^agc_|trace'on feat(agc): configure trace event buffers #5808's head1effd67b7plus this commit (518 tests, all pass exceptagc_driver_stencil_ref_export, skipped as onmain),tools/check_conventions.py.Hades II, title screen,
APS5_TRACE_SECONDS=150:30, on the earlier revision of this PR (its own capacity setting instead of feat(agc): configure trace event buffers #5808's; the drop reporting is the same apart from the merge by name):"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":27.47,"events_lost":24059,"totals_full":false}}, and thetrace buffer fullmarker sits at that point of the queue-0 track.APS5_TRACE_EVENTS=4194304:"trace_dropped":false, notrace_dropped_threads, queue-0 track recorded to the end of the window (293,343 slices).The title screen fills the buffer late; in the hub (trace: the queue-0 worker fills its 262,144-event buffer in about 3 s, so a 30 s window keeps only its first tenth, and
trace_droppeddoesn't say which thread or when #5786) the default buffer fills after about 3.3 s.Not tested: Windows, other GPUs; no game run on the rebased branch.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)