VirtualBox

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


Ignore:
Timestamp:
Apr 26, 2021 10:07:45 PM (4 years ago)
Author:
vboxsync
Message:

DrvAudio: Removed a bunch of unused statistics. bugref:9890

File:
1 edited

Legend:

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

    r88718 r88719  
    154154            struct
    155155            {
    156                 STAMCOUNTER     TotalFramesPlayed;
    157                 STAMCOUNTER     AvgFramesPlayed;
    158                 STAMCOUNTER     TotalTimesPlayed;
    159                 STAMCOUNTER     TotalFramesWritten;
    160                 STAMCOUNTER     AvgFramesWritten;
    161                 STAMCOUNTER     TotalTimesWritten;
    162156                uint32_t        cbBackendWritableBefore;
    163157                uint32_t        cbBackendWritableAfter;
     
    189183#define DRVAUDIOSTREAM_MAGIC_DEAD   UINT32_C(0x17500728)
    190184
    191 
    192 #ifdef VBOX_WITH_STATISTICS
    193 /**
    194  * Structure for keeping stream statistics for the
    195  * statistic manager (STAM).
    196  */
    197 typedef struct DRVAUDIOSTATS
    198 {
    199     STAMCOUNTER TotalStreamsActive;
    200     STAMCOUNTER TotalStreamsCreated;
    201     STAMCOUNTER TotalFramesRead;
    202     STAMCOUNTER TotalFramesWritten;
    203     STAMCOUNTER TotalFramesMixedIn;
    204     STAMCOUNTER TotalFramesMixedOut;
    205     STAMCOUNTER TotalFramesLostIn;
    206     STAMCOUNTER TotalFramesLostOut;
    207     STAMCOUNTER TotalFramesOut;
    208     STAMCOUNTER TotalFramesIn;
    209     STAMCOUNTER TotalBytesRead;
    210     STAMCOUNTER TotalBytesWritten;
    211     /** How much delay (in ms) for input processing. */
    212     STAMPROFILEADV DelayIn;
    213     /** How much delay (in ms) for output processing. */
    214     STAMPROFILEADV DelayOut;
    215 } DRVAUDIOSTATS, *PDRVAUDIOSTATS;
    216 #endif
    217185
    218186/**
     
    317285
    318286#ifdef VBOX_WITH_STATISTICS
    319     /** Statistics for the statistics manager (STAM). */
    320     DRVAUDIOSTATS           Stats;
     287    /** Statistics. */
     288    struct
     289    {
     290        STAMCOUNTER TotalStreamsActive;
     291        STAMCOUNTER TotalStreamsCreated;
     292        STAMCOUNTER TotalFramesRead;
     293        STAMCOUNTER TotalFramesIn;
     294        STAMCOUNTER TotalBytesRead;
     295    } Stats;
    321296#endif
    322297} DRVAUDIO;
     
    557532    {
    558533        STAM_COUNTER_RESET(&pStreamEx->In.Stats.TotalFramesCaptured);
    559         STAM_COUNTER_RESET(&pStreamEx->In.Stats.TotalFramesRead);
    560534        STAM_COUNTER_RESET(&pStreamEx->In.Stats.TotalTimesCaptured);
    561535        STAM_COUNTER_RESET(&pStreamEx->In.Stats.TotalTimesRead);
     
    563537    else if (pStreamEx->Core.enmDir == PDMAUDIODIR_OUT)
    564538    {
    565         STAM_COUNTER_RESET(&pStreamEx->Out.Stats.TotalFramesPlayed);
    566         STAM_COUNTER_RESET(&pStreamEx->Out.Stats.TotalFramesWritten);
    567         STAM_COUNTER_RESET(&pStreamEx->Out.Stats.TotalTimesPlayed);
    568         STAM_COUNTER_RESET(&pStreamEx->Out.Stats.TotalTimesWritten);
    569539    }
    570540    else
     
    16891659        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalTimesCaptured, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    16901660                               "Total number of playbacks.", "%s/TotalTimesCaptured", pStreamEx->Core.szName);
    1691         PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalFramesRead, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    1692                                "Total frames read.", "%s/TotalFramesRead", pStreamEx->Core.szName);
    16931661        PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->In.Stats.TotalTimesRead, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    16941662                               "Total number of reads.", "%s/TotalTimesRead", pStreamEx->Core.szName);
     
    16971665    {
    16981666        Assert(pCfgGuest->enmDir == PDMAUDIODIR_OUT);
    1699         PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalFramesPlayed, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    1700                                "Total frames played.", "%s/TotalFramesPlayed", pStreamEx->Core.szName);
    1701         PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalTimesPlayed, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    1702                                "Total number of playbacks.", "%s/TotalTimesPlayed", pStreamEx->Core.szName);
    1703         PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalFramesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    1704                                "Total frames written.", "%s/TotalFramesWritten", pStreamEx->Core.szName);
    1705         PDMDrvHlpSTAMRegisterF(pDrvIns, &pStreamEx->Out.Stats.TotalTimesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_NONE,
    1706                                "Total number of writes.", "%s/TotalTimesWritten", pStreamEx->Core.szName);
    17071667    }
    17081668#endif /* VBOX_WITH_STATISTICS */
     
    24552415    AssertMsg(PDMAudioPropsIsSizeAligned(&pStreamEx->Guest.Cfg.Props, cbBuf),
    24562416              ("Stream '%s' got a non-frame-aligned write (%RU32 bytes)\n", pStreamEx->Core.szName, cbBuf));
    2457 
    2458 /// @todo    STAM_PROFILE_ADV_START(&pThis->Stats.DelayOut, out); /* (stopped in drvAudioStreamPlayLocked) */
    24592417
    24602418    int rc = RTCritSectEnter(&pThis->CritSect);
     
    34043362    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalStreamsCreated);
    34053363    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesRead);
    3406     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesWritten);
    3407     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesMixedIn);
    3408     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesMixedOut);
    3409     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesLostIn);
    3410     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesLostOut);
    3411     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesOut);
    34123364    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalFramesIn);
    34133365    PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalBytesRead);
    3414     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.TotalBytesWritten);
    3415     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.DelayIn);
    3416     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->Stats.DelayOut);
    34173366#endif
    34183367
     
    36343583    PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesRead,      "TotalFramesRead",
    36353584                              STAMUNIT_COUNT, "Total frames read by device emulation.");
    3636     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesWritten,   "TotalFramesWritten",
    3637                               STAMUNIT_COUNT, "Total frames written by device emulation ");
    3638     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesMixedIn,   "TotalFramesMixedIn",
    3639                               STAMUNIT_COUNT, "Total input frames mixed.");
    3640     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesMixedOut,  "TotalFramesMixedOut",
    3641                               STAMUNIT_COUNT, "Total output frames mixed.");
    3642     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesLostIn,    "TotalFramesLostIn",
    3643                               STAMUNIT_COUNT, "Total input frames lost.");
    3644     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesLostOut,   "TotalFramesLostOut",
    3645                               STAMUNIT_COUNT, "Total output frames lost.");
    3646     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesOut,       "TotalFramesOut",
    3647                               STAMUNIT_COUNT, "Total frames played by backend.");
    36483585    PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesIn,        "TotalFramesIn",
    36493586                              STAMUNIT_COUNT, "Total frames captured by backend.");
    36503587    PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalBytesRead,       "TotalBytesRead",
    36513588                              STAMUNIT_BYTES, "Total bytes read.");
    3652     PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalBytesWritten,    "TotalBytesWritten",
    3653                               STAMUNIT_BYTES, "Total bytes written.");
    3654 
    3655     PDMDrvHlpSTAMRegProfileAdvEx(pDrvIns, &pThis->Stats.DelayIn,           "DelayIn",
    3656                                  STAMUNIT_NS_PER_CALL, "Profiling of input data processing.");
    3657     PDMDrvHlpSTAMRegProfileAdvEx(pDrvIns, &pThis->Stats.DelayOut,          "DelayOut",
    3658                                  STAMUNIT_NS_PER_CALL, "Profiling of output data processing.");
    36593589#endif
    36603590
Note: See TracChangeset for help on using the changeset viewer.

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