Skip to content
Commit 1fe1dc01 authored by Jesse Hall's avatar Jesse Hall
Browse files

Preload app-process HALs in Zygote

Some HALs, like a.h.graphics.mapper, are always passthrough and are
used by nearly all app processes. Preload those in Zygote to save app
startup time and share more pages between processes. This has the side
effect of also preloading a bunch of HIDL-related system and vndk
libraries that would also otherwise be loaded independently by every
app.

An earlier attempt at this change tried to preload the HAL via a
static initializer in libui.so (which is already preloaded, and which
is the immediate client of the HAL). But several other non-Zygote
processes also use libui.so, and didn't have SELinux permission to
access the device nodes used by the HAL. This version uses an explicit
call from Zygote to preload the HAL, instead of doing it implicitly.

Bug: 62353585
Test: check that a.h.graphics.mapper is in /proc/`pid zygote64`/maps
Change-Id: I42405c3b6cdf1ae412039140d656d15a6d4f8882
parent 49e6000f
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