simpleperf: dump maps only when needed in system wide recording.

Currently simpleperf dumps maps for all processes before recording. It
can take about 10s or longer.
This patch avoids the overhead by switching to dump maps for a process
when the first sample hits that process.

Bug: 111270937
Test: run simpleperf manually, the preparation time for system wide
Test: recording doesn't exceed 150ms.
Test: run simpleperf_unit_test.
Change-Id: I832ef9a9a67dd3a6a4ed97f276786e8e4aea3db4
1 file changed