Loading services/gpuservice/tracing/GpuMemTracer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ void GpuMemTracer::traceInitialCounters() { mGpuMem->traverseGpuMemTotals([](int64_t ts, uint32_t gpuId, uint32_t pid, uint64_t size) { GpuMemDataSource::Trace([&](GpuMemDataSource::TraceContext ctx) { auto packet = ctx.NewTracePacket(); packet->set_timestamp_clock_id(perfetto::protos::pbzero::BUILTIN_CLOCK_MONOTONIC); packet->set_timestamp(ts); auto* event = packet->set_gpu_mem_total_event(); event->set_gpu_id(gpuId); Loading services/vibratorservice/VibratorCallbackScheduler.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -71,14 +71,17 @@ void CallbackScheduler::schedule(std::function<void()> callback, std::chrono::mi void CallbackScheduler::loop() { while (true) { std::lock_guard<std::mutex> lock(mMutex); std::unique_lock<std::mutex> lock(mMutex); if (mFinished) { // Destructor was called, so let the callback thread die. break; } while (!mQueue.empty() && mQueue.top().isExpired()) { mQueue.top().run(); DelayedCallback callback = mQueue.top(); mQueue.pop(); lock.unlock(); callback.run(); lock.lock(); } if (mQueue.empty()) { // Wait until a new callback is scheduled. Loading Loading
services/gpuservice/tracing/GpuMemTracer.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ void GpuMemTracer::traceInitialCounters() { mGpuMem->traverseGpuMemTotals([](int64_t ts, uint32_t gpuId, uint32_t pid, uint64_t size) { GpuMemDataSource::Trace([&](GpuMemDataSource::TraceContext ctx) { auto packet = ctx.NewTracePacket(); packet->set_timestamp_clock_id(perfetto::protos::pbzero::BUILTIN_CLOCK_MONOTONIC); packet->set_timestamp(ts); auto* event = packet->set_gpu_mem_total_event(); event->set_gpu_id(gpuId); Loading
services/vibratorservice/VibratorCallbackScheduler.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -71,14 +71,17 @@ void CallbackScheduler::schedule(std::function<void()> callback, std::chrono::mi void CallbackScheduler::loop() { while (true) { std::lock_guard<std::mutex> lock(mMutex); std::unique_lock<std::mutex> lock(mMutex); if (mFinished) { // Destructor was called, so let the callback thread die. break; } while (!mQueue.empty() && mQueue.top().isExpired()) { mQueue.top().run(); DelayedCallback callback = mQueue.top(); mQueue.pop(); lock.unlock(); callback.run(); lock.lock(); } if (mQueue.empty()) { // Wait until a new callback is scheduled. Loading