d3d12/timeline: attribute slow command-list ops, caller sites, and bound pipelines in stall and timed traces (D3D12-TIMELINE-STALL-LIST-OP) #3136
Open
zmasi wants to merge 5 commits from
upstream-pr/3136 into main
pull from: upstream-pr/3136
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!3136
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3136"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-02T13:33:53Z.
Claimed in the coordination issue as:
D3D12-TIMELINE-STALL-LIST-OP(https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7345129758)Addresses #3105 (does not close it: surfaces the command-list operation, caller return site, and bound title pipeline on slow list calls in stall and timed timeline captures; separate changes address underlying stall sources).
What and why
Extends command-list slow-call timeline attribution (
>= 50 us) so both one-shot rolling stall captures (LEONIDA_TIMELINE_STALL_MS) and timed captures (LEONIDA_TIMELINE) attribute the specific command-list operation, a stack-local caller return site, and the list's currently bound title pipeline pointer instead of collapsing into an unattributed"a long list call"span:"a long list call"blindness in#3105:timeline::record::calledemitted generic"a long list call"withEvent.a = 0andEvent.b = 0, while gatingstack()behindtimed_on()so stall mode (STACKunallocated,Event.stack == 0) retained zero operation, callsite, or pipeline context.list.rsonly timedwith_stateclosures anonymously and left non-with_statehost-list recording methods (ResourceBarrier,BarrierGroups,Sync,CopyBufferRegion,CopyResource,CopyTextureRegion,ResolveSubresource,ClearRenderTargetView,ClearDepthStencilView,CopyMemoryToMemoryX, andWaitValue/WaitValue64list cuts) untimed.timeline::reporthad no long-list-call section insummary_stall_with_freqand ignoredEvent.a/Event.bon long-list-call spans in Chrome JSONargs.copystat.rs,list.rs,timeline.rs,timeline/record.rs):copystat::recorded_op(started, op, pipeline)gatingtimeline::called_from_list(took, op, pipeline)behindtimeline::on(), adding zero call overhead when timeline recording is off.bound_pipeline: AtomicUsizeat the end ofList(preservingoffset_of!(List, put) == 0x18andoffset_of!(List, pipeline_shadow) + 32 == 0x560) across creation,Reset,SetPipelineState,Close,detach, anddetach_parts.with_statecallers with static"a long list call: <Op>"and wraps non-with_statehost-list recording operations (ResourceBarrier,BarrierGroups,Sync, copies, resolves, clears, andWaitValue/WaitValue64cuts) once viameasure_call+with_state_untimedwithout double-counting, usingblack_box(&started)and alignedexternal/upscale->run_external/upscale_nowframe depth soRtlCaptureStackBackTrace(3, 1, ...)resolves the list op's caller (thin::translate/thin::run_plainor title callsite) identically indevand optimized (diag) builds without touchingSTACK(Event.stack == 0in stall mode andsize_of::<Event>() == 64preserved).timeline/report.rs):Trace::doing/chain_stallattributes stall chains directly to"a long list call: <Op>".summary_stall_with_freqadds"list calls of 50 us or more in trigger interval: who, op, caller site, bound title pipeline", formattingEvent.bin hex ({:#x}, matching the hex value ofpipelinein"first bind"log lines).chrome_inneremits"op","at","site", and"pipeline"inargsfor long-list-call spans (preferringEvent.stackin timed mode and falling back toEvent.a).Tested
985661b34ontoorigin/maind0bf821fa):python -I scripts/red_green.py HEAD --no-fetch --no-python(with--features diagnosticstimeline::runner):verdict: red then green(2/2new testsred -> green,17/17existingtimeline::tests pass on both).x86_64-pc-windows-msvc):cargo test -p leonida-gpu --features diagnostics --lib --target x86_64-pc-windows-msvc timeline::(devand--releaseopt-level=3):19 passed, 0 failed(verifies exact caller identity via PE.pdataRtlLookupFunctionEntryin both unoptimized andopt-level=3builds,Event.stack == 0in stall mode, and stall/timed.txt+ Chrome JSON formatting).cargo test -p leonida-gpu --features diagnostics --lib --target x86_64-pc-windows-msvc copystat:::4 passed, 0 failed.cargo test -p leonida-gpu [--features diagnostics] --lib --target x86_64-pc-windows-msvc list:::12 passed, 0 failedin bothdiagnosticsand default builds.cargo clippy -p leonida-gpu [--features diagnostics] --all-targets --no-deps --target x86_64-pc-windows-msvc:0warnings in touched files.python -I scripts/check_no_game_data.pyandpython -I tests/test_text_write_line_endings.py: exit0.GPUs tested: NVIDIA GeForce RTX 3090 24 GB, driver 610.88, Windows 11 Pro
10.0.26200(host D3D12 command-list and timeline unit tests; no retail title run).AI-assisted: yes — authored with Gemini 4 Carbon (High) and independently audited across two read-only review cycles by Gemini 4 Neon (XHigh) (which caught and verified the
opt-level=3sibcall frame-depth alignment and zero-overhead!timeline::on()gate).Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T17:01:51Z.
Ran natively on Windows 11, head
0518fc48emerged intomain(43fc605ed, merges cleanly; still merges cleanly into today's5b1fff821), on an NVIDIA card and on WARP. Besides the suites, I checked what the body does not cover: theplayprofile (thin LTO, one codegen unit), several threads recording at once, the bounds, the cost, and the reports.Suites on the merge. MEASURED.
leonida-gpu --lib --features diagnostics, cardleonida-gpu --lib(no diagnostics)long_list_calls_record_op_caller_site_and_pipeline_in_stall_and_timed_modes,--profile playtimeline::+copystat::,--profile playreal_waits_are_recorded_with_who_ended_themfails, and fails the same way onmainunderplay: a symbol-name check, unrelated to this PRclippy -p leonida-gpu --all-targets, with and without diagnosticsCaller site and pipeline, several threads at once. Throwaway test, stall mode. 8 threads, each with its own title list (its own pipeline pointer at creation) and its own
#[inline(never)]caller, each doing 200externalcalls of about 100 us. Every retained event was checked:Event.aresolved through.pdatato that thread's caller, andEvent.bwas that list's pipeline. MEASURED.So attribution holds under concurrency and with thin LTO. What is lost is lost whole: the stall ring's
try_lockdrops the event (and counts it indropped_contention). That behaviour is older than this PR, but with 8 recording threads it was 4 to 12 % of the slow calls here. Since the new stall summary ranks ops by total time, that loss is worth keeping in mind when reading it.READ IN CODE: every timed call site I found either calls
with_state/measure_calldirectly from the op function, or goes through an#[inline(always)]helper (wait_for,copy_resource_inner,copy_texture_region_inner,reset_inner,external,upscale), or through a deliberate#[inline(never)]frame (run_external,upscale_now). None of the timed paths nests a timedwith_stateinside ameasure_callclosure. Thin lists replay on the back list in record order, so the pipeline a replayed op carries is the one bound at that point.Bounds. Throwaway test. MEASURED.
EVENTS+ 5,000 slow callsSTACKS(65,536); stall mode leavesEvent.stackat 0 throughoutNo new buffer:
LIST_RUNis oneCellper thread.Cost. Throwaway test,
--profile play --features diagnostics, card: best of 7 x 5,000 calls, 5 runs each, on a machine that was busy with other builds. MEASURED.mainSyncResourceBarrierClearRenderTargetViewTurning the timeline on (stall mode, calls under 50 us) costs nothing I can see over it being off. Against
main,Syncis the same. The barrier and the clear came out about 70 and 200 ns slower at the median. Those two are now timed (twoInstantreads andrecorded_op) where they were not before. But themainand PR runs were not interleaved, and one earlier PR run had the clear at 740-760 ns, so I would not quote these as the cost. A clear in the title's frame is far from a hot path anyway.The "list calls" line of a diagnostics run changes.
copystat::peek(RecordCalls)before and after one call. MEASURED.mainSyncResourceBarrierClearRenderTargetViewCopies, resolves, clears, barrier groups and value waits are now timed, and nested
with_statecalls no longer count twice. That is intended, but the "recording per frame: N list calls, X ms" figures of a diagnostics build are not comparable across this PR, in either direction, depending on the mix. A line in the body would help anyone comparing logs.Timed report: one site spread over many pipelines. Throwaway test of
summary(). One caller site with 40 slow calls of 1 ms, each under a different pipeline (40 ms in all), and one other site with a single 5 ms call. MEASURED.mainthe key is the site alone (READ IN CODE), so the same calls would be one 40 ms row on top.In a real timed capture, where
thin::translateor one title function binds many pipelines, the heaviest site can drop out of the top 25. Keeping that table keyed by op and site, and leaving per-pipeline detail to the stall summary and the JSON, would keep the old ranking.Chrome JSON. A site name with a quote and a backslash is escaped and the file parses (the test's
parse_json). A span witha == 0gives"at":"","site":"0x0","pipeline":"", which is valid. MEASURED.Smaller things (READ IN CODE).
copystat::recordedandtimeline::calledhave no callers left and are kept with#[allow(dead_code)]. A test still callscalledwith its own frame depth (skip 1), whilerecordedwould go throughcalled_from_listwith skip 3, one frame too far for a direct caller. Removingrecordedavoids that trap.git merge-treeagainst #2834's head conflicts inleonida-gpu/src/list.rs. #2834 adds two-argumentwith_statecalls (targets_writtenin clear, clear-depth and resolve, and itswait). Whichever lands second needs a rebase and op names for those calls.Not checked: a capture from a running title (no game run), and the attribution under the
diagprofile itself (dev,playand the body's opt-level 3 runs bracket it).GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:18:23Z.
Verification of #3136 (third party, code review on Linux; not built: Windows-only
leonida-gpu)0518fc48eb705382fd1d60cf5975c0ac476c4a5c(5 files:list.rs,copystat.rs,timeline.rs,timeline/record.rs,timeline/report.rs; +1054/-297).128648cfe.git merge-tree --write-tree origin/main pr/3136againstmain45dc41f95is clean(70 commits behind). CI on the head: 6/6 success.
python -I scripts/check_no_game_data.pyon the 5 files: exit 0.Review
caller's return site and the bound title pipeline. Each
list.rsentry point goes throughwith_state(this, "<op>", ..)ormeasure_call, and the pipeline is tracked in a new per-listbound_pipelineatomic (set inset_pipelineandreset, cleared on close).#[cfg(feature = "diagnostics")]. In non-diagnostics builds the onlyaddition is a relaxed
AtomicUsizestore perSetPipelineStateandReset, which is negligible.Kal0s-design checked the
playprofile.copystat::recordedandtimeline::calledno longer have callers.They are kept with
#[allow(dead_code)](copystat.rs:1090,timeline/record.rs:343).git grepat the headfinds no caller. Remove them.
called_from_listrecords the return site with a fixedskip = 3. Thecomment explains it as
called_from_list, thenrecorded_op(#[inline(never)]), then thelist.rsopfunction (kept from a sibling call by
std::hint::black_box(&started)), then its caller. That depends onwith_state/measure_callbeing inlined (#[inline(always)]is a strong hint, not a guarantee under everyprofile or LTO setting) and on
black_boxdefeating tail calls. If either changes, the report names the wrongframe with no error. Capture the return address at the extern entry (
list.rsop functions) and pass it down,or check the resolved symbol in a test, so a shift is caught.
list.rschurn is mechanical (each entry wrapped in a named op). It is reviewable, but asplit into "name the ops" and "pipeline + caller site" would have been easier to audit.
timeline/report.rsgains report-format tests. Kal0s-design ran the suites natively on an NVIDIA cardand on WARP, including several recording threads and the play profile.
Process
Verdict: defects (minor). Remove the
#[allow(dead_code)]functions, and make the caller-site skip robust orcovered by a test.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-02T19:39:52Z.
Thanks @MoonEyes for the sharp catch on both points! Addressed in
c9f63c3b85(merged with currentorigin/main):AGENTS.md): deletedcopystat::recorded(copystat.rs) andtimeline::called(timeline/record.rs) along with their#[allow(dead_code)]attributes (0remaining callers)..pdatacaller attribution +--profile playCOM vtable test (list.rs,copystat.rs,timeline/record.rs):with_state/measure_callwrapper functions withwith_state!/measure_call!macros expanding directly inside all 41 timedlist.rsentry points (eliminating intermediate helper frames across all profiles/LTO), passing[entry_fn, optional_wrapper_fn]function-pointer anchors down totimeline::called_from_liston the>= 50 usslow path.resolve_list_caller_inusesRtlLookupFunctionEntry[BeginAddress, EndAddress).pdatabounds to step past contiguouslist.rsentry/wrapper frames (falling back torecorded_op's immediate caller when an entry is inlined or tail-called, and degrading cleanly when.pdatais absent) instead of relying on fixedskip = 3..pdatashapes (resolve_list_caller_handles_inlining_wrappers_tail_calls_and_missing_pdata) and updatedlong_list_calls_record_op_caller_site_and_pipeline_in_stall_and_timed_modesto invoke real COM vtableextern "system"slots (SetPipelineState, tail-positionOMSetStencilRef, andResourceBarrier) plusexternalfrom#[inline(never)]callers, verifyingEvent.a.saturating_sub(1)resolves inside each caller's.pdata[BeginAddress, EndAddress)in bothdev(20/20timeline::,4/4copystat::) and--profile play(13/13timeline::record::,4/4copystat::,12/12list::).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T22:01:07Z.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T23:15:15Z.
VERIFY-3136 — Windows nativo: 41 pruebas de
listy el control muerde el resolutor; el módulo pidediagnostics985661b34,c9f63c3b8—list.rs(+752/−…),timeline/{record,report}.rs,copystat.rs74bd1bcd4(the branch also mergesmain)Ran
The trap again, third time tonight:
timeline::recordandtimeline::reportare#[cfg(all(windows, feature = "diagnostics"))]. Without the feature the resolve test does not exist, andcargo test -p leonida-gpu --lib resolve_list_calleranswers0 passed; 762 filtered outwith exit 0 — "no test" for a test that is there.Negative control, and my first attempt was wrong: I disabled the Win32
.pdatalookup (RtlLookupFunctionEntry) and the test still passed — because the test drivesresolve_list_caller_in, the pure resolver, with synthetic ranges; the Win32 call is not on its path. A control that does not change what the test exercises proves nothing. Moved into the resolver:It bites.
What the change is: on a list call deeper than
DEEP, the runtime now captures a short stack walk and resolves the caller structurally through.pdatafunction ranges, recording the op, the caller site and the bound pipeline — and the report formats them in both stall and timed modes. The doc comment explains why.pdataand not the stack alone: inlining and wrappers make the frame abovecalled_from_listthe wrong answer, and a tail call can remove it entirely — which is exactly what the resolver's four cases in the test name cover.What I could not test: the attribution in a real slow list call under the title — the resolver and the formatting are unit-tested, the walk itself is not.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T00:02:09Z.
RUN (in game, batch of nine pull requests), each head merged with
git merge --no-ffonto main81efe4566, in one build: #313674bd1bcd4, #315653c3100ce, #3206d024194b3, #3248efd21d867, #3256e7aad1d4c, #32623643c2879, #2851b83b0b375, #312589bf1d328, #2642164506d01. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. The precompile before the world took 619 s, against 157 s for the previous batch; the shader-side changes in this batch (#3156, #3262) probably left the pipeline cache cold (not checked). Switches that are off by default (for example #2851'sLEONIDA_TITLE_MEMORY_SCALE, #3136's timeline attribution) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only.AI-assisted (Claude Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.