mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
pps: print out message when we get the first counters
Mostly for debug purposes, show the first visible counter timestamp. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>
This commit is contained in:
parent
61c7e1bf48
commit
1082c8ad11
2 changed files with 9 additions and 0 deletions
|
|
@ -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<std::mutex> 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);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ class GpuDataSource : public perfetto::DataSource<GpuDataSource, GpuDataSourceTr
|
|||
|
||||
/// GPU timestamp of packet sent with counter descriptors
|
||||
uint64_t descriptor_gpu_timestamp = 0;
|
||||
|
||||
/// Used to track the first available counters
|
||||
bool got_first_counters = false;
|
||||
};
|
||||
|
||||
} // namespace pps
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue