Message ID | 1377906241-8463-5-git-send-email-benjamin.widawsky@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Aug 30, 2013 at 04:43:57PM -0700, Ben Widawsky wrote: > Tracing vm eviction is really the event we care about. For the cases we > evict everything, we still will get the trace. Keep both until you retire evict_everything for good. Sometimes you need flashing neon lights to explain things in a trace. -Chris
On Sat, Aug 31, 2013 at 01:06:02AM +0100, Chris Wilson wrote: > On Fri, Aug 30, 2013 at 04:43:57PM -0700, Ben Widawsky wrote: > > Tracing vm eviction is really the event we care about. For the cases we > > evict everything, we still will get the trace. > > Keep both until you retire evict_everything for good. Sometimes you need > flashing neon lights to explain things in a trace. > -Chris > Got it. Will resend after Daniel has a chance to look. Do you want this squashed in with the previous patch to keep the trace events as well?
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index a3e279d..ff91ac6 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -175,6 +175,8 @@ int i915_gem_evict_vm(struct i915_address_space *vm, bool do_idle) struct i915_vma *vma, *next; int ret; + trace_i915_gem_evict_vm(vm); + if (do_idle) { ret = i915_gpu_idle(vm->dev); if (ret) @@ -208,8 +210,6 @@ i915_gem_evict_everything(struct drm_device *dev) if (lists_empty) return -ENOSPC; - trace_i915_gem_evict_everything(dev); - /* The gpu_idle will flush everything in the write domain to the * active list. Then we must move everything off the active list * with retire requests. diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index e2c5ee6..d2a5502 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h @@ -218,19 +218,19 @@ TRACE_EVENT(i915_gem_evict, __entry->mappable ? ", mappable" : "") ); -TRACE_EVENT(i915_gem_evict_everything, - TP_PROTO(struct drm_device *dev), - TP_ARGS(dev), +TRACE_EVENT(i915_gem_evict_vm, + TP_PROTO(struct i915_address_space *vm), + TP_ARGS(vm), TP_STRUCT__entry( - __field(u32, dev) + __field(struct i915_address_space *, vm) ), TP_fast_assign( - __entry->dev = dev->primary->index; + __entry->vm = vm; ), - TP_printk("dev=%d", __entry->dev) + TP_printk("vm=%p", __entry->vm) ); TRACE_EVENT(i915_gem_ring_dispatch,
Tracing vm eviction is really the event we care about. For the cases we evict everything, we still will get the trace. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_gem_evict.c | 4 ++-- drivers/gpu/drm/i915/i915_trace.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-)