simpleperf: fix more recording time than requested.
EventSelectionSet::ReadMmapEventData() reads records until the
record buffer is empty, so stop recording event may not be processed
in time.
This patch fix it with below changes:
1. Add time limit for ReadMmapEventData(). So it can stop reading
after taking 100ms.
2. In FinishReadMmapEventData(), stop the read thread before reading
all records.
Bug: 111083259
Test: run simpleperf_unit_test.
Test: run simpleperf manually, the recording time takes no more than
Test: 200ms than requested.
Change-Id: Id58e100e774770e3a10e41ac593867e8ae3b2288
6 files changed