Debug/Profile Temp and TempJob buffers


I noticed that there is some support to see how much memory is used for these buffers, but I would need also to know what's inside the buffers. Is it possible?

Hi again :)

There isn't yet, no. For multiple reasons:

  • Their content changes on a high frequency multiple times per frame, but the Memory Profiler only takes a snapshot. We'd ideally need to continuously monitor/capture these to give more reasonable insights into them

  • Any such introspection would slow the allocators down and they are build for high frequency access and speed, so we need to tread carefully and make the overhead for this controllable and minimal.

  • Tracking their Allocation site would likely add a great deal of actionability for minimal overhead.

Theres likely more that I'm forgetting right now but, we're very aware of the interest in better introspection possibilities for these and working towards and exploring solutions to these. As you've noticed, there are some other more fundamental issues, especially around the UX that we'll likely be focusing on first.

what I would need to know is what takes spaces in the buffer before the clear(). I guess it's not possible to have this information just from the snapshot unless unity allocator system provides already some debug info.

I recently had a problem that drove me crazy. For days the profiler was showing impossible memory fallback (we discussed it remember?) All of the sudden now they are gone. Left me scarred.