Index: /trunk/src/VBox/Devices/Storage/DrvVD.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 64670)
+++ /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 64671)
@@ -411,4 +411,13 @@
     unsigned                 cErrors;
     /** @} */
+
+    /** @name Statistics.
+     * @{ */
+    /** how many attempts were made to query a direct buffer pointer from the
+     * device/driver above. */
+    STAMCOUNTER              StatQueryBufAttempts;
+    /** How many attempts to query a direct buffer pointer succeeded. */
+    STAMCOUNTER              StatQueryBufSuccess;
+    /** @} */
 } VBOXDISK;
 
@@ -2929,8 +2938,11 @@
         void *pvBuf = NULL;
         size_t cbBuf = 0;
+
+        STAM_COUNTER_INC(&pThis->StatQueryBufAttempts);
         rc = pThis->pDrvMediaExPort->pfnIoReqQueryBuf(pThis->pDrvMediaExPort, pIoReq, &pIoReq->abAlloc[0],
                                                       &pvBuf, &cbBuf);
         if (RT_SUCCESS(rc))
         {
+            STAM_COUNTER_INC(&pThis->StatQueryBufSuccess);
             pIoReq->ReadWrite.cbIoBuf           = cbBuf;
             pIoReq->ReadWrite.fDirectBuf        = true;
@@ -4391,4 +4403,7 @@
         if (pThis->aIoReqAllocBins[i].hMtxLstIoReqAlloc != NIL_RTSEMFASTMUTEX)
             RTSemFastMutexDestroy(pThis->aIoReqAllocBins[i].hMtxLstIoReqAlloc);
+
+    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatQueryBufAttempts);
+    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatQueryBufSuccess);
 }
 
@@ -5381,4 +5396,9 @@
         }
     } /* !fEmptyDrive */
+
+    PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->StatQueryBufAttempts, "QueryBufAttempts",
+                              STAMUNIT_COUNT, "Number of attempts to query a direct buffer.");
+    PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->StatQueryBufSuccess, "QueryBufSuccess",
+                              STAMUNIT_COUNT, "Number of succeeded attempts to query a direct buffer.");
 
     if (RT_FAILURE(rc))
