simpleperf: merge branch lists before converting them to autofdo.
It merges branch lists from all input files, then convert
them to AutoFDO format. This allows parsing instructions of one binary
only once, instead of being linear to the number of input files.
Here is a simple experiment:
input.txt contains the name of branch_list.data 10000 times.
branch_list.data is a branch list file generated from testdata/etm/perf.data.
Before this CL:
$ time simpleperf inject -i @input.txt
real 0m0.685s
After this CL:
$ time simpleperf inject -i @input.txt
real 0m0.122s
So in this experiment, we can reduce 80% time by merging branch lists.
Bug: 208403304
Test: run simpleperf_unit_test
Change-Id: I5fa84727732b7a5648bdd832a3e790168110b975
1 file changed