drm/i915/trace: add hw_id to gem requests trace points
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 18 Dec 2017 15:19:59 +0000 (15:19 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 18 Dec 2017 16:10:32 +0000 (16:10 +0000)
commit151a99ec771c49fbfaa785e2e2bc3672641f2076
tree94cf05ff1c34d7c54e801d8e41e40c676c40c039
parent3c2d06714d6e083eba94a1a4e865f6acb98ef611
drm/i915/trace: add hw_id to gem requests trace points

When monitoring the GPU with i915 perf, reports are tagged with a hw
id. Gem context creation tracepoints already have a hw_id field,
unfortunately you only get this correlation between a process id and a
hw context id once when the context is created. It doesn't help if you
started monitoring after the process was initialized or if the drm fd
was transfered from one process to another.

This change adds the hw_id field to gem requests, so that correlation
can also be done on submission.

v2: Place hw_id at the end of the tracepoint to not disrupt too much
    existing tools (Chris)

v3: Reorder hw_id field again (Chris)

v4: Add missing hw_id to i915_gem_request_wait_begin tracepoint (Chris)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171218151959.14073-3-lionel.g.landwerlin@intel.com
drivers/gpu/drm/i915/i915_trace.h