base::Daemonize(): wait for child setsid() When invoking 'adb shell perfetto --background ...' the parent (perfetto --background) prints the child pid and returns immediately. If the child has not had a chance to be scheduled and has not run past the setsid(), it will be killed via a SIGHUP as well, which breaks the expectations of 'adb shell perfetto --background'. Interestingly most daemon() in various libc() implementations seem to be affected by the same bug. Bug: 238644870 Change-Id: I21084a0f3af022255a605705ea4dc60e62cab555
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.