drm/i915: Add tracepoints
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Aug 2009 10:15:50 +0000 (11:15 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Sep 2009 00:05:21 +0000 (01:05 +0100)
commit1c5d22f76dc721f3acb7a3dadc657a221e487fb7
tree99a69f1be4f10d1e38af2c5ece4b5905f7a5701a
parent74dff282237ea8c0a5df1afd8526eac4b6cee063
drm/i915: Add tracepoints

By adding tracepoint equivalents for WATCH_BUF/EXEC we are able to monitor
the lifetimes of objects, requests and significant events. These events can
then be probed using the tracing frameworks, such as systemtap and, in
particular, perf.

For example to record the stack trace for every GPU stall during a run, use

  $ perf record -e i915:i915_gem_request_wait_begin -c 1 -g

And

  $ perf report

to view the results.

[Updated to fix compilation issues caused.]
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Ben Gamari <bgamari@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_trace.h [new file with mode: 0644]
drivers/gpu/drm/i915/i915_trace_points.c [new file with mode: 0644]