simpleperf: reduce pre recording time for system wide etm recording.
When doing system wide etm recording, the pre recording time is mostly
taken by dumping all process maps, which takes up to 3 seconds.
To reduce the latency, this patch dumps process maps in another thread
(map record thread) while recording, and merges the map info into the
recording file after recording.
In an experiment running `simpleperf record -e cs-etm -a --duration 1
--log verbose`:
Before the patch:
simpleperf D cmd_record.cpp:736] Prepare recording time 850.676 ms
After the patch:
simpleperf D cmd_record.cpp:748] Prepare recording time 32.3878 ms
Bug: 165304881
Test: run simpleperf_unit_test.
Change-Id: I2a5f8f3a8774c2eda17c47c866c012874286d5cd
7 files changed