Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 92ecabf6 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

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
parent 36bd4dd1
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