gpu: Check time to trace

Add a check to the trace callback to make sure that the time to trace is
less than the sampling period requested by perfetto.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
3 jobs for check-time-to-trace in 1 minute and 47 seconds
Status Job ID Name Coverage
  Check
passed #5678045
clang-format

00:00:08

 
  Build
passed #5678047
aarch64
aarch64

00:01:28

passed #5678046
kvm
x86_64

00:01:38