atagen

monolith

public
Star0
Watch0

Commit d9aeb9e28e74

tarball

atagen <boss@atagen.co>2026-10-19 11:36 UTC

1 file changed+10-2
render-vk: log gpu allocations when gpu_allocator debug logging is on

The installed compositor runs through a capability wrapper that makes it non-dumpable, so its smaps can only be read as root and say nothing about which allocation backs a mapping. The allocator's own log names and sizes every allocation, and costs nothing unless RUST_LOG enables it.
Modified file: crates/render-vk/src/device.rs+10 additions−2 deletions
@@ -1,6 +1,6 @@
11 use crate::Error;
22 use ash::vk;
3-use gpu_allocator::AllocationSizes;
3+use gpu_allocator::{AllocationSizes, AllocatorDebugSettings};
44 use gpu_allocator::vulkan::{Allocator, AllocatorCreateDesc};
55 use std::mem::ManuallyDrop;
66 use std::sync::Mutex;
@@ -196,7 +196,15 @@ impl Shared {
196196 instance: instance.clone(),
197197 device: device.clone(),
198198 physical_device: physical,
199- debug_settings: Default::default(),
199+ // The live compositor is non-dumpable, so with
200+ // RUST_LOG=gpu_allocator=debug its log is the only way to see
201+ // what fills the memory it maps.
202+ debug_settings: AllocatorDebugSettings {
203+ log_memory_information: true,
204+ log_allocations: true,
205+ log_frees: true,
206+ ..Default::default()
207+ },
200208 buffer_device_address: false,
201209 // Host blocks are pinned system RAM that stays resident while any
202210 // allocation lives in them, and the default 64 MB block is mostly idle.