Linux: profiling the runtime under Proton without perf or root #236
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/236"
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 DexNom/VIctory. Originally posted by fsrajner on 2026-11-29T22:42:34Z.
Builds on #234 (its one commit is included here; it lets
.cand.pyfiles pass the asset policy).scripts/linux/prof: aperf_event_opensampler, symbolizers for victory.exe (PDB), PE images (exports) and ELF objects (Wine'sntdll.so,wineserver, libc), per-thread CPU time and off-CPU states.kernel.perf_event_paranoid=2, the usual default, allows this for your own processes, so it works on desktops withoutperfor sudo. The README has a typical round.These found, on one PC, the wineserver walking its whole list of views at every map and unmap (Wine bug 60868) and the kernel walking every userptr page at every submission.
Nothing in the runtime changes. Tested:
sampler.cbuilds withcc -O2 -Wall, the Python scripts compile, and all of it was used for the measurements behind the Linux notes PR;cargo xtask policypasses.🤖 Generated with Claude Code
Imported from DexNom/VIctory. Originally posted by Zippp69 on 2026-11-30T16:44:40Z.
Review of
d5e5b8fPass the elapsed duration to statdiff.py. The README invokes
./statdiff.py before.txt after.txt, but the script requires a third argument. I reproduced theIndexErrorusing synthetic snapshots and verified that providing the elapsed seconds produces the expected CPU percentage. Document the duration between snapshots, including the sampling window. README · statdiff.pyUse the recorded PE mapping to symbolize samples. Two synthetic maps with a mocked LLVM subprocess reproduced both failures. With a space in
DexNom Runtime/victory.exe,split()truncated the path and the script sent no sample for symbolization. With a relocated executable and no spaces, it sent the live address0x150001120where the preferred-image address is0x140001120. Preserve the pathname using a bounded split, identify the image from its mappings, and translate the sampled IP to the preferred image address before invoking the symbolizer. analyze.pyImported from DexNom/VIctory. Originally posted by Zippp69 on 2026-11-30T16:50:48Z.
Tested documentation fix for the missing elapsed duration. Follow-up to the profiling review at
d5e5b8f. Mark the example as Bash, start its elapsed-seconds counter before the first snapshot, and pass that duration tostatdiff.pyafter the second snapshot. I verified the script on synthetic snapshots. A change of 100 user ticks across two seconds reports 50% of one core.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.