Skip to content
Commit 228fc029 authored by Ioannis Ilkos's avatar Ioannis Ilkos
Browse files

Per process DMA-BUF stats

In order to detect memory regressions caused by improper handling of
dma-buf buffers we need to measure how this memory is used.

This change:
- Introduces DmabufInfoReader which wraps libmeminfo and provides
per-process DMA-BUF stats.
- Specifically, measures buffers mapped to the process address space
(from /proc/pid/maps). This is supported on all devices.
- For devices running 5.4+ (where the system processes can query fdinfo)
also measures the total retained memory (either by mmap or an open fd).
- Introduces a statsd atom that collects this for all running managed
processes. Non-managed processes will also hold dmabufs, but the
likelihood of them causing issues (post-launch) is smaller so I am
trading them off for cheaper collection (if indeed we encounter such
problems, they will definitely be caught by the total dmabuf counters).

Test: manual
Bug: 183708249
Change-Id: I5e0ef58ac1a66ebe2d280c5733de46ba84f75a46
parent 1d70937f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment