egl: Refactor init of CPU tracing in EGL for Android
egl: Refactor init of CPU tracing in EGL for Android
eglGetPlatformDisplay is called by Android's Zygote when preloading
EGL at boot. When Perfetto is initialized by `util_cpu_trace_init`, it
launches side threads to handle tasks. Unfortunately, Zygote does not
tolerate unexpected threads created within its PID. As a result, Zygote
aborts and Android devices fail to boot.
Signed-off-by: Renato Pereyra <renatopereyra@chromium.org>