From patchwork Fri Aug 30 23:43:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 2852260 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4B23A9F495 for ; Fri, 30 Aug 2013 23:46:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7818820290 for ; Fri, 30 Aug 2013 23:46:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A147320274 for ; Fri, 30 Aug 2013 23:46:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FA7FE6520 for ; Fri, 30 Aug 2013 16:46:35 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id A4EB6E627F for ; Fri, 30 Aug 2013 16:44:24 -0700 (PDT) Received: by mail.bwidawsk.net (Postfix, from userid 5001) id 5D54D5835B; Fri, 30 Aug 2013 16:44:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lundgren.jf.intel.com (jfdmzpr03-ext.jf.intel.com [134.134.139.72]) by mail.bwidawsk.net (Postfix) with ESMTPSA id DFADE58337; Fri, 30 Aug 2013 16:44:12 -0700 (PDT) From: Ben Widawsky To: Intel GFX Date: Fri, 30 Aug 2013 16:43:57 -0700 Message-Id: <1377906241-8463-5-git-send-email-benjamin.widawsky@intel.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1377906241-8463-1-git-send-email-benjamin.widawsky@intel.com> References: <1377906241-8463-1-git-send-email-benjamin.widawsky@intel.com> Cc: Ben Widawsky , Ben Widawsky Subject: [Intel-gfx] [PATCH 4/8] drm/i915: trace vm eviction instead of everything X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/i915/i915_gem_evict.c | 4 ++-- drivers/gpu/drm/i915/i915_trace.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) 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,