sna: Add some debugging to show count of outstanding requests during retire

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-28 08:16:43 +01:00
parent 62b557065e
commit 7e73fa02ed
1 changed files with 26 additions and 0 deletions

View File

@ -1306,6 +1306,14 @@ static bool kgem_retire__flushing(struct kgem *kgem)
kgem_bo_free(kgem, bo);
}
}
#if DEBUG_KGEM
{
int count = 0;
list_for_each_entry(bo, &kgem->flushing, request)
count++;
ErrorF("%s: %d bo on flushing list\n", __FUNCTION__, count);
}
#endif
return retired;
}
@ -1394,6 +1402,24 @@ static bool kgem_retire__requests(struct kgem *kgem)
free(rq);
}
#if DEBUG_KGEM
{
int count = 0;
list_for_each_entry(bo, &kgem->requests, request)
count++;
bo = NULL;
if (!list_is_empty(&kgem->requests))
bo = list_first_entry(&kgem->requests,
struct kgem_request,
list)->bo;
ErrorF("%s: %d outstanding requests, oldest=%d\n",
__FUNCTION__, count, bo ? bo->handle : 0);
}
#endif
return retired;
}