gpu_lock alone left a segfault in libvulkan about once in 20 runs of
the ui-egui tests, even in a test holding the lock. The last wgpu
instance going away tears Vulkan down, and the next one can find it
half gone. Keeping one instance stops it: 16 threads creating and
dropping instances with no lock crashed 8 of 8 runs, and 0 of 8 with
one kept.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
memory-stats reads /proc/self/smaps by default on Linux: every sample formats and parses one
block per mapping while holding the mmap lock. The benches' RssSampler polls it every 2 ms, so
on a profile of bevel_bench --size 4000x3000 the rss-sampler thread was ~22% of all samples
(smaps_account 14.7%, smaps_pte_entry 6.3%), contending with the measured threads.
Enable the crate's always_use_statm feature: one short read of the kernel's RSS counters, the
same number VmRSS reports. The measured code is unchanged; only the harness overhead goes.