simpleperf inject: support converting branch-list to autofdo.
Below is a comparation between autofdo and branch-list output, running
on a perf.data generated by 10s system wide recording while running
monkey test:
$ simpleperf inject -o autofdo.data
time: 1m58.95s
file size: 12M.
$ simpleperf inject -o branch.data --output branch-list
time: 22.06s.
file size: 7.7M.
$ simpleperf inject -i branch.data -o branch_autofdo.data
time: 7.40s.
file size: 12M.
In the experiment, generating branch-list is about 5 times faster
than generating autofdo output. So it is faster to generate branch-list
output. The effect is more significant when more binaries and processes
are involved. The generated file size is decreased from 12M to 7.7M,
reducing about 36%.
In the experiment, it is 15 times faster to generate autofdo output
from branch-list than from perf.data. One main reason should be improved
locality by decoding binaries one by one.
The count of lines in branch_autofdo.data is 0.3% less than that in
autofdo.data. It should be because of missing instruction ranges parsed
from Exception packets.
Bug: 151665001
Test: run simpleperf_unit_test.
Change-Id: I2bcf43f5e788b628bf00f55e80ca32b39801837e
8 files changed