[Spice-devel] [PATCH qxl-win v3] display/res: __AllocMem: verbose debugging (log_level 12)
Alon Levy
alevy at redhat.com
Thu Jul 7 02:43:33 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 de55889..3c38e88 100644
--- a/display/res.c
+++ b/display/res.c
@@ -389,8 +389,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.4
More information about the Spice-devel
mailing list