Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd8461e3 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

GpuMemTracer: remove the sleep workaround

Bug: 161909227
Test: adb shell perfetto --query | grep gpu.
Test: Take a perfetto trace with android.gpumem enabled
Change-Id: Ie2a62c5a29a53fa8d93308dd2edd4968e067c537
parent 901f8ee2
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -44,10 +44,6 @@ void GpuMemTracer::initialize(std::shared_ptr<GpuMem> gpuMem) {
    mGpuMem = gpuMem;
    perfetto::TracingInitArgs args;
    args.backends = perfetto::kSystemBackend;
    // TODO(b/160016498): Find a better way to wait for traced
    // Sleep for 30 seconds to make sure the data source is registered only
    // after traced starts.
    sleep(30);
    perfetto::Tracing::Initialize(args);
    registerDataSource();
    std::thread tracerThread(&GpuMemTracer::threadLoop, this);