diff --git a/src/tool/pps/pps_datasource.cc b/src/tool/pps/pps_datasource.cc index 088bc7ec975..c7bd4caba36 100644 --- a/src/tool/pps/pps_datasource.cc +++ b/src/tool/pps/pps_datasource.cc @@ -100,6 +100,7 @@ void GpuDataSource::OnStart(const StartArgs &args) driver->enable_perfcnt(time_to_sleep.count()); state = State::Start; + got_first_counters = false; { std::lock_guard lock(started_m); @@ -314,6 +315,11 @@ void GpuDataSource::trace(TraceContext &ctx) continue; } + if (!got_first_counters) { + PPS_LOG("Got first counters at gpu_ts=0x%016lx", gpu_timestamp); + got_first_counters = true; + } + auto packet = ctx.NewTracePacket(); packet->set_timestamp_clock_id(driver->gpu_clock_id()); packet->set_timestamp(gpu_timestamp); diff --git a/src/tool/pps/pps_datasource.h b/src/tool/pps/pps_datasource.h index f2946cbd6a5..51174a72a83 100644 --- a/src/tool/pps/pps_datasource.h +++ b/src/tool/pps/pps_datasource.h @@ -65,6 +65,9 @@ class GpuDataSource : public perfetto::DataSource