diff options
author | Yabin Cui <yabinc@google.com> | 2020-03-31 11:59:47 -0700 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2020-04-24 00:49:20 +0800 |
commit | 901a08a73484b0989530fb9fc7de0829d13d6757 (patch) | |
tree | f7ee8f39dfb19f5286e82cc66021b79cebeb32d4 /simpleperf/ETMDecoder.h | |
parent | 10f527cb163b4bbd96d2f883f7cc5477a7c6f36c (diff) | |
download | extras-901a08a73484b0989530fb9fc7de0829d13d6757.tar.gz |
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: 153039105
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
Merged-In: I6fdf32d3bac18ed3762c944c282ec881d09395b4
(cherry picked from commit 2c294914c1eeb30754a8a2449795b296bd2176e9)
Diffstat (limited to 'simpleperf/ETMDecoder.h')
-rw-r--r-- | simpleperf/ETMDecoder.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/simpleperf/ETMDecoder.h b/simpleperf/ETMDecoder.h index 3ebbd7dd..b9493acd 100644 --- a/simpleperf/ETMDecoder.h +++ b/simpleperf/ETMDecoder.h @@ -61,6 +61,7 @@ class ETMDecoder { virtual void RegisterCallback(const CallbackFn& callback) = 0; virtual bool ProcessData(const uint8_t* data, size_t size) = 0; + virtual bool FinishData() = 0; }; } // namespace simpleperf
\ No newline at end of file |