diff options
author | Kalesh Singh <kaleshsingh@google.com> | 2021-06-29 21:43:27 +0000 |
---|---|---|
committer | Kalesh Singh <kaleshsingh@google.com> | 2021-06-30 20:53:44 +0000 |
commit | 90e4a2f96e82a38871495e561f2c02cf0359cb05 (patch) | |
tree | bf8475d4db03d263a4711762abc7f767e662b9ea /memtrack | |
parent | 415f0ce4fe05f37ddd47a23dafc4489c3aea7ebb (diff) |
memtrack: Update AIDL memtrack hal documentation
Fix Memtrack GRAPHICS type definition to also inculde
GPU-mapped DMA-BUF memory.
Clarify SMAPS_UNACCOUTNED should also include memory
mapped with VM_PFNMAP set.
Bug: 192384999
Test: N/A
Change-Id: I5370efa731bc6307e4fe9b454796361e9a1ac5eb
Merged-In: I5370efa731bc6307e4fe9b454796361e9a1ac5eb
Diffstat (limited to 'memtrack')
-rw-r--r-- | memtrack/aidl/android/hardware/memtrack/IMemtrack.aidl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/memtrack/aidl/android/hardware/memtrack/IMemtrack.aidl b/memtrack/aidl/android/hardware/memtrack/IMemtrack.aidl index e78d4d7c32..13c3389730 100644 --- a/memtrack/aidl/android/hardware/memtrack/IMemtrack.aidl +++ b/memtrack/aidl/android/hardware/memtrack/IMemtrack.aidl @@ -31,12 +31,14 @@ import android.hardware.memtrack.MemtrackType; * accounting for stride, bit depth, rounding up to page size, etc. * * The following getMemory() categories are important for memory accounting in - * `dumpsys meminfo` and should be reported as described below: + * Android frameworks (e.g. `dumpsys meminfo`) and should be reported as described + * below: * * - MemtrackType::GRAPHICS and MemtrackRecord::FLAG_SMAPS_UNACCOUNTED - * This should report the PSS of all DMA buffers mapped by the process - * with the specified PID. This PSS can be calculated using ReadDmaBufPss() - * form libdmabufinfo. + * This should report the PSS of all CPU-Mapped DMA-BUFs (buffers mapped into + * the process address space) and all GPU-Mapped DMA-BUFs (buffers mapped into + * the GPU device address space on behalf of the process), removing any overlap + * between the CPU-mapped and GPU-mapped sets. * * - MemtrackType::GL and MemtrackRecord::FLAG_SMAPS_UNACCOUNTED * This category should report all GPU private allocations for the specified @@ -46,6 +48,10 @@ import android.hardware.memtrack.MemtrackType; * Any other memory not accounted for in /proc/<pid>/smaps if any, otherwise * this should return 0. * + * SMAPS_UNACCOUNTED memory should also include memory that is mapped with + * VM_PFNMAP flag set. For these mappings PSS and RSS are reported as 0 in smaps. + * Such mappings have no backing page structs from which PSS/RSS can be calculated. + * * Constructor for the interface should be used to perform memtrack management * setup actions and must be called once before any calls to getMemory(). */ |