diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-04 14:13:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-04 14:13:50 +0100 |
commit | 394b2ce51d8378893f14896e600713544d473925 (patch) | |
tree | d0ca2872c24a679ea04e5c8b22e8420decc898eb /src | |
parent | dbf98d8963b53a3c68deb1e2624d1269c8b0d97a (diff) |
sna: Add a few more DBG to track refcnts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_accel.c | 5 | ||||
-rw-r--r-- | src/sna/sna_dri.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 21cd342f..7891a5f6 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1616,10 +1616,12 @@ sna_pixmap_undo_cow(struct sna *sna, struct sna_pixmap *priv, unsigned flags) { struct sna_cow *cow = COW(priv->cow); - DBG(("%s: pixmap=%ld, handle=%d, flags=%x\n", + DBG(("%s: pixmap=%ld, handle=%d [refcnt=%d], cow refcnt=%d, flags=%x\n", __FUNCTION__, priv->pixmap->drawable.serialNumber, priv->gpu_bo->handle, + priv->gpu_bo->refcnt, + cow->refcnt, flags)); assert(priv->gpu_bo == cow->bo); @@ -1628,6 +1630,7 @@ sna_pixmap_undo_cow(struct sna *sna, struct sna_pixmap *priv, unsigned flags) list_del(&priv->cow_list); if (!--cow->refcnt) { + DBG(("%s: freeing cow\n", __FUNCTION__)); assert(list_is_empty(&cow->list)); free(cow); } else if (IS_COW_OWNER(priv->cow) && priv->pinned) { diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 00a65a9e..5fa92f7f 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -488,6 +488,9 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo) struct sna_pixmap *priv = sna_pixmap(pixmap); RegionRec region; + DBG(("%s: pixmap=%ld, handle=%d\n", + __FUNCTION__, pixmap->drawable.serialNumber, bo->handle)); + assert(pixmap->drawable.width * pixmap->drawable.bitsPerPixel <= 8*bo->pitch); assert(pixmap->drawable.height * bo->pitch <= kgem_bo_size(bo)); assert(bo->proxy == NULL); |