u/pacing: Trace GPU info

This commit is contained in:
Jakob Bornecrantz 2022-09-27 14:49:09 +01:00 committed by Jakob Bornecrantz
parent f63c786ac9
commit 08f6440aa4

View file

@ -156,7 +156,16 @@ static void
pc_info_gpu(
struct u_pacing_compositor *upc, int64_t frame_id, uint64_t gpu_start_ns, uint64_t gpu_end_ns, uint64_t when_ns)
{
// No-op
if (U_TRACE_CATEGORY_IS_ENABLED(timing)) {
#define TE_BEG(TRACK, TIME, NAME) U_TRACE_EVENT_BEGIN_ON_TRACK_DATA(timing, TRACK, TIME, NAME, PERCETTO_I(frame_id))
#define TE_END(TRACK, TIME) U_TRACE_EVENT_END_ON_TRACK(timing, TRACK, TIME)
TE_BEG(pc_gpu, gpu_start_ns, "gpu");
TE_END(pc_gpu, gpu_end_ns);
#undef TE_BEG
#undef TE_END
}
}
static void