simpleperf: adjust based on opencsd change.

Currently, simpleperf gets branch_addr from instruction decoder.
But OpenCSD is changed to cache InstrRange elements. Thus when
simpleperf gets an InstrRange element, the instruction decoder
may point to an instruction executed later.

Fix it by using the start_addr of the next InstrRange element
as the branch_addr of the current InstrRange element.

Also add a test.
Also use recorded binary path in output to help test.

Bug: none
Test: run simpleperf manually so the inject result doesn't
Test: change for a 10s system wide recording data.
Test: run simpleperf_unit_test.

Change-Id: I6fdf32d3bac18ed3762c944c282ec881d09395b4
5 files changed