intel: INTEL_MEASURE cpu mode
authorFelix DeGrood <felix.j.degrood@intel.com>
Wed, 22 Feb 2023 01:40:19 +0000 (01:40 +0000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 14 Apr 2023 21:57:50 +0000 (21:57 +0000)
commit55ba4575be4ab58e1f41df8e8583c937344dd2bd
treea123d402760f3d94e9de10a41fd29b2ceb798302
parentc45dee34aab1688c05205d0c50d864b2980aa719
intel: INTEL_MEASURE cpu mode

INTEL_MEASURE normally measures timing of GPU events. However, it
is sometimes useful to instead measure when these gfx API calls
were requested of the driver. INTEL_MEASURE cpu can be used in
in conjunction with other driver debug capabilities, like
INTEL_DEBUG=pc for analyzing stalls/flushes or when debugger is
attached, to track which frame you're currently on or where in
the frame you're at.

Initial commit, without plumbing into anv/iris.

"INTEL_MEASURE=cpu" will collect a cpu timestamp for each
INTEL_MEASURE event instead of GPU timestamps.

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21505>
src/intel/common/intel_measure.c
src/intel/common/intel_measure.h