diff options
author | Yabin Cui <yabinc@google.com> | 2024-05-07 17:02:43 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2024-05-08 10:01:03 -0700 |
commit | b89b1ef923929d2ada9770b4360e04c41c2670bd (patch) | |
tree | 88f518076105bd8ea3ef3c08ffd56abcb3d6a47e /simpleperf | |
parent | eb98a8b5a1259ccf37bb194a28012d72c873103c (diff) | |
download | extras-b89b1ef923929d2ada9770b4360e04c41c2670bd.tar.gz |
simpleperf: Flush ETM data at the end of recording
So we can get the last ETM data generated during recording.
Bug: 336375740
Test: run simpleperf manually
Change-Id: I449517fb959e4f8310cd1fc582e2182552d0353d
Diffstat (limited to 'simpleperf')
-rw-r--r-- | simpleperf/cmd_record.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/simpleperf/cmd_record.cpp b/simpleperf/cmd_record.cpp index ee93e1ea..d57c3422 100644 --- a/simpleperf/cmd_record.cpp +++ b/simpleperf/cmd_record.cpp @@ -805,6 +805,12 @@ bool RecordCommand::DoRecording(Workload* workload) { return false; } time_stat_.stop_recording_time = GetSystemClock(); + if (event_selection_set_.HasAuxTrace()) { + // Disable ETM events to flush the last ETM data. + if (!event_selection_set_.DisableETMEvents()) { + return false; + } + } if (!event_selection_set_.SyncKernelBuffer()) { return false; } |