traced_probes: Put all statsd atoms into a single batch The main change is that rather than ending up with a packet per atom we now end up with many atoms in a single packet. There are a couple of small tweaks to achieve this: - Now the root timestamp on the packet is always the time we are *receiving* the atom batch in boot time. This aids sorting in trace_processor until we sort out some special sorting for atoms. - Remove [packed=true] from ShellData timestamp_nanos. statsd does not actually pack this field and protozero is quite picky about packed field which makes it hard to parse. We don't actually need to parse it after this change but I didn't want to leave it around to trip up the next person. - Rather than parsing each ShellData one atom at a time and inserting them into the trace individually now we take all whole contents of ShellData and put it in a StatsdAtom track packet (whose format matches exactly precisely so this was possible.) $ adb push test/configs/statsd.cfg /data/misc/perfetto-configs/statsd.cfg $ adb shell perfetto --txt -c /data/misc/perfetto-configs/statsd.cfg -o /data/misc/perfetto-traces/statsd.pb $ adb pull /data/misc/perfetto-traces/statsd.pb statsd.pb $ ninja -C out/r traceconv && out/r/traceconv text statsd.pb Test: See above. Change-Id: I48ebb10c56ffbfbca14eb4db3962218a740fbb19
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.