Remove additional 1 sec wait after starting the perfetto trace.
Bug: b/235066144
Test: PerfettoHelperTest.
Change-Id: Ia251295fc9e7aed32ebbf62c2a6af8c8ae8dc698
diff --git a/libraries/collectors-helper/perfetto/src/com/android/helpers/PerfettoHelper.java b/libraries/collectors-helper/perfetto/src/com/android/helpers/PerfettoHelper.java
index 2a0732f..91a53a6 100644
--- a/libraries/collectors-helper/perfetto/src/com/android/helpers/PerfettoHelper.java
+++ b/libraries/collectors-helper/perfetto/src/com/android/helpers/PerfettoHelper.java
@@ -105,13 +105,7 @@
if (startOutput != null && !startOutput.isEmpty()) {
mPerfettoProcId = Integer.parseInt(startOutput.trim());
}
- // TODO(b/235066144): evaluate whether this load-bearing(!) sleep is still necessary.
- // Setting up tracing with kallsyms symbolisation requires traced_probes to do cpu-bound
- // address table creation for 500+ ms, which was observed to boost cpu frequencies.
- // This helper does wait until kallsyms setup is done before proceeding
- // (--background-wait), but this extra sleep aims to let the device quiesce before the
- // test being measured is started.
- SystemClock.sleep(1000);
+
if(!isTestPerfettoRunning()) {
return false;
}