From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 04/18] drm/i915: add context information to objects Date: Wed, 28 Mar 2012 17:20:11 -0700 Message-ID: <20120328172011.02f41d0e@bwidawsk.net> References: <1332103198-25852-1-git-send-email-ben@bwidawsk.net> <1332103198-25852-5-git-send-email-ben@bwidawsk.net> <20120328223621.GG2046@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 19B7A9E796 for ; Wed, 28 Mar 2012 17:20:22 -0700 (PDT) In-Reply-To: <20120328223621.GG2046@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 29 Mar 2012 00:36:21 +0200 Daniel Vetter wrote: > On Sun, Mar 18, 2012 at 01:39:44PM -0700, Ben Widawsky wrote: > > Handy mostly for assertions. > > > > Signed-off-by: Ben Widawsky > > I don't see the point of carrying around a obj->context_id - > context_id's are file_priv, so they're not that useful in the > tracepoint. I suggest you just drop the contex_id arg there - the obj > pointers are global and imo good enough for identification. And the > few BUG_ON's don't seem really useful either. > -Daniel obj->context_id was requested by Chris to clarify the trace events. I vaguely recall telling him that you won't like it. I personally dislike using object pointer though I do agree it serves the same purpose. The other nice thing about having the context id is it makes it easy in debug situations to find out if a certain object is a context object. But no use case for that yet.