Changeset 88666 in vbox
- Timestamp:
- Apr 22, 2021 11:43:03 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r88561 r88666 2917 2917 2918 2918 #ifdef VBOX_WITH_STATISTICS 2919 char szStatName[255];2920 2919 if (pCfgGuest->enmDir == PDMAUDIODIR_IN) 2921 2920 { 2922 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalFramesCaptured", pStreamEx->Core.szName); 2923 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->In.Stats.TotalFramesCaptured, 2924 szStatName, STAMUNIT_COUNT, "Total frames played."); 2925 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalTimesCaptured", pStreamEx->Core.szName); 2926 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->In.Stats.TotalTimesCaptured, 2927 szStatName, STAMUNIT_COUNT, "Total number of playbacks."); 2928 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalFramesRead", pStreamEx->Core.szName); 2929 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->In.Stats.TotalFramesRead, 2930 szStatName, STAMUNIT_COUNT, "Total frames read."); 2931 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalTimesRead", pStreamEx->Core.szName); 2932 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->In.Stats.TotalTimesRead, 2933 szStatName, STAMUNIT_COUNT, "Total number of reads."); 2921 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalFramesCaptured, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2922 "Total frames played.", "%s/TotalFramesCaptured", pStreamEx->Core.szName); 2923 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalTimesCaptured, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2924 "Total number of playbacks.", "%s/TotalTimesCaptured", pStreamEx->Core.szName); 2925 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalFramesRead, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2926 "Total frames read.", "%s/TotalFramesRead", pStreamEx->Core.szName); 2927 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalTimesRead, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2928 "Total number of reads.", "%s/TotalTimesRead", pStreamEx->Core.szName); 2934 2929 } 2935 2930 else 2936 2931 { 2937 2932 Assert(pCfgGuest->enmDir == PDMAUDIODIR_OUT); 2938 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalFramesPlayed", pStreamEx->Core.szName); 2939 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->Out.Stats.TotalFramesPlayed, 2940 szStatName, STAMUNIT_COUNT, "Total frames played."); 2941 2942 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalTimesPlayed", pStreamEx->Core.szName); 2943 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->Out.Stats.TotalTimesPlayed, 2944 szStatName, STAMUNIT_COUNT, "Total number of playbacks."); 2945 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalFramesWritten", pStreamEx->Core.szName); 2946 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->Out.Stats.TotalFramesWritten, 2947 szStatName, STAMUNIT_COUNT, "Total frames written."); 2948 2949 RTStrPrintf(szStatName, sizeof(szStatName), "Guest/%s/TotalTimesWritten", pStreamEx->Core.szName); 2950 PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pStreamEx->Out.Stats.TotalTimesWritten, 2951 szStatName, STAMUNIT_COUNT, "Total number of writes."); 2933 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalFramesPlayed, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2934 "Total frames played.", "%s/TotalFramesPlayed", pStreamEx->Core.szName); 2935 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalTimesPlayed, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2936 "Total number of playbacks.", "%s/TotalTimesPlayed", pStreamEx->Core.szName); 2937 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalFramesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2938 "Total frames written.", "%s/TotalFramesWritten", pStreamEx->Core.szName); 2939 PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalTimesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE, 2940 "Total number of writes.", "%s/TotalTimesWritten", pStreamEx->Core.szName); 2952 2941 } 2953 2942 #endif /* VBOX_WITH_STATISTICS */ … … 3532 3521 3533 3522 PPDMDRVINS const pDrvIns = pThis->pDrvIns; 3523 PDMDrvHlpSTAMDeregisterByPrefix(pDrvIns, pStreamEx->Core.szName); 3524 3534 3525 if (pStreamEx->Core.enmDir == PDMAUDIODIR_IN) 3535 3526 { 3536 #ifdef VBOX_WITH_STATISTICS3537 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->In.Stats.TotalFramesCaptured);3538 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->In.Stats.TotalTimesCaptured);3539 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->In.Stats.TotalFramesRead);3540 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->In.Stats.TotalTimesRead);3541 #endif3542 3527 if (pThis->In.Cfg.Dbg.fEnabled) 3543 3528 { … … 3548 3533 pStreamEx->In.Dbg.pFileStreamRead = NULL; 3549 3534 } 3550 if (!pStreamEx->fNoMixBufs)3551 {3552 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Host.MixBuf.cMixed);3553 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Guest.MixBuf.cUsed);3554 }3555 3535 } 3556 3536 else 3557 3537 { 3558 3538 Assert(pStreamEx->Core.enmDir == PDMAUDIODIR_OUT); 3559 #ifdef VBOX_WITH_STATISTICS3560 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Out.Stats.TotalFramesPlayed);3561 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Out.Stats.TotalTimesPlayed);3562 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Out.Stats.TotalFramesWritten);3563 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Out.Stats.TotalTimesWritten);3564 #endif3565 3539 if (pThis->Out.Cfg.Dbg.fEnabled) 3566 3540 { … … 3571 3545 pStreamEx->Out.Dbg.pFileStreamWrite = NULL; 3572 3546 } 3573 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Out.Stats.cbBackendWritableAfter); 3574 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Out.Stats.cbBackendWritableBefore); 3575 if (!pStreamEx->fNoMixBufs) 3576 { 3577 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Host.MixBuf.cUsed); 3578 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Guest.MixBuf.cMixed); 3579 } 3580 } 3581 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Host.Cfg.Backend.cFramesBufferSize); 3582 if (!pStreamEx->fNoMixBufs) 3583 { 3584 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Host.MixBuf.cFrames); 3585 PDMDrvHlpSTAMDeregister(pDrvIns, &pStreamEx->Guest.MixBuf.cFrames); 3586 } 3587 3547 } 3588 3548 LogFlowFunc(("Returning %Rrc\n", rc)); 3589 3549 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.