summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKalesh Singh <kaleshsingh@google.com>2020-12-07 01:51:39 -0500
committerKalesh Singh <kaleshsingh@google.com>2020-12-22 20:49:10 +0000
commit2e12c78fbca041d5262f019c62dfb53168c45f8c (patch)
tree7a75a66773a0fa7e5af32778e67aaf3c76efd723 /include
parent762a69d031bb23baa0472dd499e253d12c03a62c (diff)
downloadlibmemtrack-2e12c78fbca041d5262f019c62dfb53168c45f8c.tar.gz
Reland: libmemtrack: Add support for AIDL memtrack HAL
________________ Regarding the issues caused by the reverted version of these changes. Root cause of the reported issues is that ServiceManager cannot get the IMemtrack AIDL service, and getService() will busy loop for 5 seconds trying to get the service. ``` 12-22 12:22:22.501 1827 10885 W ServiceManager: Service android.hardware.memtrack.IMemtrack/default didn't start. Returning NULL 12-22 12:22:22.501 1827 10885 I ServiceManager: Waiting for service 'android.hardware.memtrack.IMemtrack/default' on '/dev/binder'... ``` Also because the results of this getService() was not cached, we will attempt to get this service each time there is a new request from libmemtrack, causing another 5 seconds delay each time. Fix: We check if the service is declared before attempting to retrieve it. We use the more efficient waitForService(), instead of getService() which can busy loop for 5 seconds. Cache the results of these operations so that we don’t have to retrieve the service each time there is a request from libmemtrack. Boot Time Regression Test Test: adb shell logcat -b all | grep TotalBootTime Old version of this topic: 44209ms LKGB: 19823ms New version of this topic: 20058ms Cts Graphics Test Test: atest CtsGraphicsTestCases:android.graphics.cts.BitmapTest#testWrappedHardwareBufferBitmapNotLeaking Old version of this topic: Fails LKGB: Passes New version of this topic: Passes Memoinfo Test Test: adb shell dumpsys meminfo Old version of this topic: `*** SERVICE 'meminfo' DUMP TIMEOUT (10000ms) EXPIRED ***` LKGB: <Expected output> New version of this topic: <Expected output> Battery Saver Test Test: Unplug Device; Tap Battery Save Icon from the pull down menu Old version of this topic: Battery Saver Icon does not become enabled (blue highlight) LKGB: Battery Saver Icon Enabled New version of this topic: Battery Saver Icon Enabled Bug: 175021432 Test: memtrack_test Change-Id: I6ce5c454e6a5c9b718277b4b3004f600dd0f6786
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions