[Spice-devel] [PATCH qxl-win] display/res: __AllocMem: verbose debugging (log_level 12)
Alon Levy
alevy at redhat.com
Mon Jun 20 03:59:47 PDT 2011
Cc: Yonit Halperin <yhalperi at redhat.com>
---
display/res.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/display/res.c b/display/res.c
index b70c645..5dc06a4 100644
--- a/display/res.c
+++ b/display/res.c
@@ -390,8 +390,15 @@ static void *__AllocMem(PDev* pdev, UINT32 mspace_type, size_t size, BOOL force)
UINT8 *ptr;
ASSERT(pdev, pdev && pdev->Res->mspaces[mspace_type]._mspace);
- DEBUG_PRINT((pdev, 12, "%s: 0x%lx size %u\n", __FUNCTION__, pdev, size));
-
+ DEBUG_PRINT((pdev, 12, "%s: 0x%lx %p(%d) size %u\n", __FUNCTION__, pdev,
+ pdev->Res->mspaces[mspace_type]._mspace,
+ mspace_footprint(pdev->Res->mspaces[mspace_type]._mspace),
+ size));
+#ifdef DBG
+ if (pdev && pdev->log_level && *pdev->log_level > 11) {
+ mspace_malloc_stats(pdev->Res->mspaces[mspace_type]._mspace);
+ }
+#endif
EngAcquireSemaphore(pdev->Res->malloc_sem);
while (1) {
--
1.7.5.2
More information about the Spice-devel
mailing list