libaudiohal: statically link HAL 7.x interface libraries
Since the interface libraries are not actually shared with HAL services—the system has their own versions under /system, while the HAL uses the versions from /vendor, there are no gains from using them as shared libraries. Switching to static linking allows better optimization of duplicate and unused code by the linker and reduces memory usage. For example, audioserver memory use on redfin, as reported by dumpsys meminfo (in Kilobytes): 7.0 shared libs: TOTAL PSS: 14360, RSS: 28544 7.1 shared libs: TOTAL PSS: 15515, RSS: 29120 7.1 static libs: TOTAL PSS: 14997, RSS: 28336 These interface libraries are not used by any other module on the system partition. This is confirmed by the fact that after this change their .so files do not present anymore on the system partition, which means no other module depends on them. Bug: 219730472 Test: adb shell dumpsys meminfo <audioserver PID> Change-Id: Ic590560e5e9646a173427046a53fca6d7f9f2a10
Loading
Please register or sign in to comment