summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-11 16:14:38 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-11 16:14:38 +0000
commitc83fd4e24de187700bc125037cd9ae311514213e (patch)
tree313b57b3ce6256b6dabbbd8d6dacbb83d505fc8d
parent3ae7fb918a2ca47d3944521a1ae30143dcb14eeb (diff)
sna: Add some more debug messages for VMA caching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index f7c4ca3d..d635b7c0 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -607,6 +607,8 @@ static void kgem_bo_free(struct kgem *kgem, struct kgem_bo *bo)
}
if (bo->map) {
+ DBG(("%s: releasing vma for handle=%d, count=%d\n",
+ __FUNCTION__, bo->handle, kgem->vma_count-1));
munmap(bo->map, bo->size);
list_del(&bo->vma);
kgem->vma_count--;
@@ -1871,8 +1873,8 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo, int prot)
bo->map = ptr;
kgem->vma_count++;
- DBG(("%s: caching vma for %d\n",
- __FUNCTION__, bo->handle));
+ DBG(("%s: caching vma for %d, count=%d\n",
+ __FUNCTION__, bo->handle, kgem->vma_count));
}
if (bo->needs_flush | bo->gpu) {
@@ -1896,6 +1898,8 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo, int prot)
void kgem_bo_unmap(struct kgem *kgem, struct kgem_bo *bo)
{
+ DBG(("%s: (debug) releasing vma for handle=%d, count=%d\n",
+ __FUNCTION__, bo->handle, kgem->vma_count-1));
assert(bo->map);
munmap(bo->map, bo->size);