simpleperf: fix a segfault caused by CloseEventFiles.

In aosp/2052096, simpleperf closes event files when stopping recording.
After that, GetEventAttrWithId()[0].ids is empty, which makes
ProcessJITDebugInfo() segfault.

To fix it, save result of GetEventAttrWithId() in dumping_attr_id_ when
preparing recording, and use dumping_attr_id_ in ProcessJITDebugInfo().

Bug: 227220328
Test: run simpleperf_unit_test
Change-Id: I99678ff5defc7ca998a08b2cec22f7a84d1ed7bd
1 file changed