diff options
| author | Suren Baghdasaryan <surenb@google.com> | 2020-10-23 09:31:54 -0700 |
|---|---|---|
| committer | Suren Baghdasaryan <surenb@google.com> | 2020-12-18 01:25:47 +0000 |
| commit | e4e515e2b49bb534eba0edecdad48f9a6ed1687c (patch) | |
| tree | 8dcb52d8de3cd9a7e080426e3b4247c74c68a209 /core/java/android/os/Debug.java | |
| parent | 81585a241918a71a3ab1333ed2d60a5b706736b4 (diff) | |
Add total GPU usage report into dumpsys meminfo output
With latest kernel changes, total GPU memory usage is reported and can
be obtained via a BPF program. Create JNI interface to query it and
report inside dumpsys meminfo output.
Bug: 171261987
Test: dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I949a13836d5b5bc87fc43f60871b4fbf2add6480
Diffstat (limited to 'core/java/android/os/Debug.java')
| -rw-r--r-- | core/java/android/os/Debug.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java index e2e1bbe8487f..9584bc74d6f2 100644 --- a/core/java/android/os/Debug.java +++ b/core/java/android/os/Debug.java @@ -2582,6 +2582,13 @@ public final class Debug public static native long getIonMappedSizeKb(); /** + * Return memory size in kilobytes used by GPU. + * + * @hide + */ + public static native long getGpuTotalUsageKb(); + + /** * Return whether virtually-mapped kernel stacks are enabled (CONFIG_VMAP_STACK). * Note: caller needs config_gz read sepolicy permission * |
