All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: "Segovia, Benjamin" <benjamin.segovia@intel.com>,
	DRI <dri-devel@lists.freedesktop.org>
Subject: Re: Tracking drm_intel_bo allocation
Date: Mon, 28 Mar 2011 13:26:12 -0700	[thread overview]
Message-ID: <87zkofc7q3.fsf@pollan.anholt.net> (raw)
In-Reply-To: <5812F7DC54903547874AA228AE9C46AB3D9F73E8@orsmsx504.amr.corp.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 722 bytes --]

On Fri, 25 Mar 2011 23:36:33 -0700, "Segovia, Benjamin" <benjamin.segovia@intel.com> wrote:
> Hello all,
> 
> I am using drm_intel to access the HW. I would like to know if there
> is any way to know if my application frees all the bos I used. I would
> like to be sure I cleanly freed my resources and no bo is still
> referenced.  Is there any tool in the memory allocation part of
> drm_intel to do that?

I've used the drm_intel_bufmgr_set_debug() plus post-processing to catch
major leaks before.

#!/usr/bin/awk -f

/bo_create:/ { botype[$4]++; }
/bo_unreference final:/ { botype[$4]--; }

END {
        for (name in botype) {
                printf("%s: %d\n", name, botype[name])
        }
}

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2011-03-28 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26  6:36 Tracking drm_intel_bo allocation Segovia, Benjamin
2011-03-26  7:21 ` Chris Wilson
2011-03-26  7:28   ` Segovia, Benjamin
2011-03-28 20:26 ` Eric Anholt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkofc7q3.fsf@pollan.anholt.net \
    --to=eric@anholt.net \
    --cc=benjamin.segovia@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.