VirtualBox

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


Ignore:
Timestamp:
Apr 22, 2021 6:24:15 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143976
Message:

DevHda: Added release profiling of stream starting, resetting and stopping (in nanoseconds for better relrelatability). bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

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

    r88575 r88662  
    13391339        LogFunc(("[SD%RU8] Reset enter\n", uSD));
    13401340
     1341        STAM_REL_PROFILE_START_NS(&pStreamR3->State.StatReset, a);
    13411342        hdaStreamLock(pStreamShared);
    13421343
     
    13581359# endif
    13591360        hdaStreamUnlock(pStreamShared);
     1361        STAM_REL_PROFILE_STOP_NS(&pStreamR3->State.StatReset, a);
    13601362    }
    13611363    else
     
    13661368        if (fInRun != fRun)
    13671369        {
     1370            STAM_REL_PROFILE_START_NS((fRun ? &pStreamR3->State.StatStart : &pStreamR3->State.StatStop), r);
    13681371            Assert(!fReset && !fInReset); /* (code change paranoia, currently impossible ) */
    13691372            LogFunc(("[SD%RU8] State changed (fRun=%RTbool)\n", uSD, fRun));
     
    14681471            /* Make sure to leave the lock before (eventually) starting the timer. */
    14691472            hdaStreamUnlock(pStreamShared);
     1473            STAM_REL_PROFILE_STOP_NS((fRun ? &pStreamR3->State.StatStart : &pStreamR3->State.StatStop), r);
    14701474        }
    14711475    }
     
    53275331        PDMDevHlpSTAMRegisterF(pDevIns, &pThisCC->aStreams[idxStream].State.StatDmaBufUsed, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES,
    53285332                               "Number of bytes used in the internal DMA buffer.",  "Stream%u/DMABufUsed", idxStream);
     5333
     5334        PDMDevHlpSTAMRegisterF(pDevIns, &pThisCC->aStreams[idxStream].State.StatStart, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
     5335                               "Starting the stream.",  "Stream%u/Start", idxStream);
     5336        PDMDevHlpSTAMRegisterF(pDevIns, &pThisCC->aStreams[idxStream].State.StatStop, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
     5337                               "Stopping the stream.",  "Stream%u/Stop", idxStream);
     5338        PDMDevHlpSTAMRegisterF(pDevIns, &pThisCC->aStreams[idxStream].State.StatReset, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
     5339                               "Resetting the stream.",  "Stream%u/Reset", idxStream);
    53295340    }
    53305341
  • trunk/src/VBox/Devices/Audio/DevHdaStream.h

    r88572 r88662  
    326326        /** Number of bytes involved in unresolved flow errors. */
    327327        STAMCOUNTER             StatDmaFlowErrorBytes;
     328
     329        STAMPROFILE             StatStart;
     330        STAMPROFILE             StatReset;
     331        STAMPROFILE             StatStop;
     332        STAMPROFILE             StatUnusedPadding;
    328333    } State;
    329334    /** Debug bits. */
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