VirtualBox

Changeset 2944 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
May 30, 2007 5:31:51 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
21626
Message:

Release statistics for any combination of (ATA/ATAPI)/(DMA/PIO).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r2928 r2944  
    185185     * No data that is part of the saved state after this point!!!!!
    186186     */
     187
     188    /* Release statistics: number of ATA DMA commands. */
     189    STAMCOUNTER StatATADMA;
     190    /* Release statistics: number of ATA PIO commands. */
     191    STAMCOUNTER StatATAPIO;
     192    /* Release statistics: number of ATAPI PIO commands. */
     193    STAMCOUNTER StatATAPIDMA;
     194    /* Release statistics: number of ATAPI PIO commands. */
     195    STAMCOUNTER StatATAPIPIO;
    187196
    188197    /** Statistics: number of read operations and the time spent reading. */
     
    41174126                s->u64CmdTS = u64TS;
    41184127
     4128                if (s->fATAPI)
     4129                {
     4130                    if (s->fDMA)
     4131                        STAM_REL_COUNTER_INC(&s->StatATAPIDMA);
     4132                    else
     4133                        STAM_REL_COUNTER_INC(&s->StatATAPIPIO);
     4134                }
     4135                else
     4136                {
     4137                    if (s->fDMA)
     4138                        STAM_REL_COUNTER_INC(&s->StatATADMA);
     4139                    else
     4140                        STAM_REL_COUNTER_INC(&s->StatATAPIO);
     4141                }
     4142
    41194143                pCtl->fChainedTransfer = false;
    41204144
     
    59285952        }
    59295953
     5954        for (uint32_t j = 0; j < RT_ELEMENTS(pData->aCts[i].aIfs); j++)
     5955        {
     5956            ATADevState *pIf = &pData->aCts[i].aIfs[j];
     5957            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatATADMA,       STAMTYPE_COUNTER,    STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,       "Number of ATA DMA transfers.", "/Devices/ATA%d/Unit%d/DMA", i, j);
     5958            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatATAPIO,       STAMTYPE_COUNTER,    STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,       "Number of ATA PIO transfers.", "/Devices/ATA%d/Unit%d/PIO", i, j);
     5959            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatATAPIDMA,     STAMTYPE_COUNTER,    STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,       "Number of ATAPI DMA transfers.", "/Devices/ATA%d/Unit%d/AtapiDMA", i, j);
     5960            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatATAPIPIO,     STAMTYPE_COUNTER,    STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,       "Number of ATAPI PIO transfers.", "/Devices/ATA%d/Unit%d/AtapiPIO", i, j);
    59305961#ifdef VBOX_WITH_STATISTICS /** @todo release too. */
    5931         for (uint32_t j = 0; j < RT_ELEMENTS(pData->aCts[i].aIfs); j++)
    5932         {
    5933             ATADevState *pIf = &pData->aCts[i].aIfs[j];
    59345962            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatReads,        STAMTYPE_PROFILE_ADV, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL,  "Profiling of the read operations.", "/Devices/ATA%d/Unit%d/Reads", i, j);
    59355963            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatBytesRead,    STAMTYPE_COUNTER,     STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,           "Amount of data read.",              "/Devices/ATA%d/Unit%d/ReadBytes", i, j);
     
    59375965            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatBytesWritten, STAMTYPE_COUNTER,     STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,           "Amount of data written.",           "/Devices/ATA%d/Unit%d/WrittenBytes", i, j);
    59385966            PDMDevHlpSTAMRegisterF(pDevIns, &pIf->StatFlushes,      STAMTYPE_PROFILE,     STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL,  "Profiling of the flush operations.","/Devices/ATA%d/Unit%d/Flushes", i, j);
    5939         }
     5967#endif
     5968        }
     5969#ifdef VBOX_WITH_STATISTICS /** @todo release too. */
    59405970        PDMDevHlpSTAMRegisterF(pDevIns, &pData->aCts[i].StatAsyncOps,       STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,   "The number of async operations.",  "/Devices/ATA%d/Async/Operations", i);
    59415971        /** @todo STAMUNIT_MICROSECS */
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