Hi folks,

This is Yiwei from the Android Platform Graphics team. On the downstream Android, vendors used to report GPU private memory allocations with debugfs nodes in their own formats. However, debugfs nodes are getting deprecated in the next Android release, so we are taking the chance to unify all the vendors to migrate their existing debugfs nodes into a standardized sysfs node structure. Then the platform is able to do a bunch of useful things: memory profiling, system health coverage, field metrics, local shell dump, in-app api, etc.

Some vendors tend to do a lot of upstreams, so we are also seeking the upstream possibilities here instead of making it an Android only thing.

Attached are screenshots for the node structure we drafted and an example for that.

For the top level root, vendors can choose their own names based on the value of ro.gfx.sysfs.0 the vendors set.

For the 2nd level pids, there are usually just a couple of them per snapshot, since we only takes snapshot for the active ones.

For the 3rd level types, the type name will be one of the GPU memory object types in lower case, and the value will be a comma separated sequence of size values for all the allocations under that specific type.

Looking forward to any concerns/comments/suggestions!

Best regards,
Yiwei