PerfettoHelper: wait until tracing is fully active before returning from the shell invocation
Right now the "perfetto" process starts tracing, backgrounds, and
immediately returns to the original shell. With --background-wait,
"perfetto" waits until the tracing service tells it that all requested
data sources have acknowledged that they've started before returning to
shell. By deferring this return, the start of the test being traced can
be deferred until we know that all data is being captured.
Typically this doesn't make much of a difference. However in this case
we'll be combining it with a change to intentionally do more upfront
work when setting up kernel address symbolisation in the ftrace data
source, to avoid overlapping that work with the test being measured. One
reason to avoid overlap is because kernel symbol table parsing is
cpu-bound, and therefore causes the OS to temporarily raise the CPU
frequencies, which in turn distorts the apparent performance of the test
being measured.
Bug: 235066144
Change-Id: I641de91b2676d817444f2a7d41e06b899db4f3e1
1 file changed