VirtualBox

Changeset 87989 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 6, 2021 11:19:57 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143112
Message:

DevHDA: Count DMA over-/underflows. bugref:9890

Location:
trunk/src/VBox/Devices
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r87961 r87989  
    51435143    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRegWritesBlockedByRun,   STAMTYPE_COUNTER, "RegWritesBlockedByRun",   STAMUNIT_OCCURENCES, "Writes blocked by byte RUN bit.");
    51445144# endif
     5145
     5146    for (uint8_t idxStream = 0; idxStream < RT_ELEMENTS(pThisCC->aStreams); idxStream++)
     5147        if (hdaGetDirFromSD(idxStream) == PDMAUDIODIR_OUT)
     5148            PDMDevHlpSTAMRegisterF(pDevIns, &pThisCC->aStreams[idxStream].State.StatDmaFlowErrors, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES,
     5149                                   "Number of DMA overflows.",  "Stream%u/DMAOverflows", idxStream);
     5150        else
     5151            PDMDevHlpSTAMRegisterF(pDevIns, &pThisCC->aStreams[idxStream].State.StatDmaFlowErrors, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES,
     5152                                   "Number of DMA underflows.", "Stream%u/DMAUnderflows", idxStream);
    51455153
    51465154    return VINF_SUCCESS;
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r87988 r87989  
    11941194        /** @todo account for this or something so we can try get back in sync
    11951195         *        later... */
    1196         LogFlowFunc(("Internal DMA/AIO buffer underflow (%#x, wanted at least %#x)\n", cbToProcessMax, pStreamShared->State.cbTransferSize));
    1197         /// @todo STAM_REL_COUNTER_INC(&pStreamR3->State.StatDmaUnderflow);
     1196        LogFlowFunc(("Internal DMA/AIO buffer %s (%#x, wanted at least %#x)\n",
     1197                     hdaGetDirFromSD(uSD) == PDMAUDIODIR_OUT ? "overflow" : "underflow",
     1198                     cbToProcessMax, pStreamShared->State.cbTransferSize));
     1199        STAM_REL_COUNTER_INC(&pStreamR3->State.StatDmaFlowErrors);
     1200#ifdef VBOX_WITH_DTRACE
     1201        VBOXDD_HDA_STREAM_DMA_FLOWERROR(uSD, cbToProcessMax, pStreamShared->State.cbTransferSize,
     1202                                        hdaGetDirFromSD(uSD) == PDMAUDIODIR_OUT ? 1 : 0);
     1203#endif
    11981204    }
    11991205
  • trunk/src/VBox/Devices/Audio/HDAStream.h

    r87961 r87989  
    262262        HDASTREAMSTATEAIO       AIO;
    263263#endif
     264        /** Under/overflow statistics counter.   */
     265        STAMCOUNTER             StatDmaFlowErrors;
    264266    } State;
    265267    /** Debug bits. */
  • trunk/src/VBox/Devices/build/VBoxDD.d

    r87961 r87989  
    3030    probe hda__stream__dma__out(uint32_t idxStream, uint32_t cb, uint64_t off);
    3131    probe hda__stream__dma__in(uint32_t idxStream, uint32_t cb, uint64_t off);
     32    probe hda__stream__dma__flowerror(uint32_t idxStream, uint32_t cbFree, uint32_t cbPeriod, int32_t fOverflow);
    3233    probe hda__stream__aio__out(uint32_t idxStream, uint32_t cb, uint64_t off);
    3334    probe hda__stream__aio__in(uint32_t idxStream, uint32_t cb, uint64_t off);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette