summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2024-05-07 17:02:43 -0700
committerYabin Cui <yabinc@google.com>2024-05-08 10:01:03 -0700
commitb89b1ef923929d2ada9770b4360e04c41c2670bd (patch)
tree88f518076105bd8ea3ef3c08ffd56abcb3d6a47e
parenteb98a8b5a1259ccf37bb194a28012d72c873103c (diff)
downloadextras-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
-rw-r--r--simpleperf/cmd_record.cpp6
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;
}