VirtualBox

Changeset 64841 in vbox for trunk


Ignore:
Timestamp:
Dec 12, 2016 5:50:01 PM (8 years ago)
Author:
vboxsync
Message:

Devices/Storage: Remove statistics superseeded by the ones available in the media access drivers now, some weren't even updated anymore

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

Legend:

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

    r64680 r64841  
    426426    SUPSEMEVENT                     hEvtProcess;
    427427
    428     /** Release statistics: number of DMA commands. */
    429     STAMCOUNTER                     StatDMA;
    430     /** Release statistics: number of bytes written. */
    431     STAMCOUNTER                     StatBytesWritten;
    432     /** Release statistics: number of bytes read. */
    433     STAMCOUNTER                     StatBytesRead;
    434     /** Release statistics: Number of I/O requests processed per second. */
    435     STAMCOUNTER                     StatIORequestsPerSecond;
    436 #ifdef VBOX_WITH_STATISTICS
    437     /** Statistics: Time to complete one request. */
    438     STAMPROFILE                     StatProfileProcessTime;
    439     /** Statistics: Amount of time to read/write data. */
    440     STAMPROFILE                     StatProfileReadWrite;
    441 #endif /* VBOX_WITH_STATISTICS */
    442 
    443428    /** The serial numnber to use for IDENTIFY DEVICE commands. */
    444429    char                            szSerialNumber[AHCI_SERIAL_NUMBER_LENGTH+1]; /** < one extra byte for termination */
     
    456441typedef AHCIPort *PAHCIPort;
    457442
    458 AssertCompileMemberAlignment(AHCIPort, StatDMA, 8);
    459443AssertCompileSizeAlignment(AHCIPort, 8);
    460444
     
    37083692    {
    37093693        if (pAhciReq->enmType == PDMMEDIAEXIOREQTYPE_READ)
    3710         {
    3711             STAM_REL_COUNTER_ADD(&pAhciPort->StatBytesRead, pAhciReq->cbTransfer);
    37123694            pAhciPort->Led.Actual.s.fReading = 0;
    3713         }
    37143695        else if (pAhciReq->enmType == PDMMEDIAEXIOREQTYPE_WRITE)
    3715         {
    3716             STAM_REL_COUNTER_ADD(&pAhciPort->StatBytesWritten, pAhciReq->cbTransfer);
    37173696            pAhciPort->Led.Actual.s.fWriting = 0;
    3718         }
    37193697        else if (pAhciReq->enmType == PDMMEDIAEXIOREQTYPE_DISCARD)
    37203698            pAhciPort->Led.Actual.s.fWriting = 0;
     
    60326010    /* Initialize static members on every port. */
    60336011    for (i = 0; i < AHCI_MAX_NR_PORTS_IMPL; i++)
    6034     {
    6035         PAHCIPort pAhciPort = &pThis->ahciPort[i];
    6036 
    6037         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatDMA, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES,
    6038                                "Number of DMA transfers.", "/Devices/SATA%d/Port%d/DMA", iInstance, i);
    6039         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatBytesRead, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_BYTES,
    6040                                "Amount of data read.", "/Devices/SATA%d/Port%d/ReadBytes", iInstance, i);
    6041         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatBytesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_BYTES,
    6042                                "Amount of data written.", "/Devices/SATA%d/Port%d/WrittenBytes", iInstance, i);
    6043         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatIORequestsPerSecond, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES,
    6044                                "Number of processed I/O requests per second.", "/Devices/SATA%d/Port%d/IORequestsPerSecond", iInstance, i);
    6045 #ifdef VBOX_WITH_STATISTICS
    6046         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatProfileProcessTime, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
    6047                                "Amount of time to process one request.", "/Devices/SATA%d/Port%d/ProfileProcessTime", iInstance, i);
    6048         PDMDevHlpSTAMRegisterF(pDevIns, &pAhciPort->StatProfileReadWrite, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_NS_PER_CALL,
    6049                                "Amount of time for the read/write operation to complete.", "/Devices/SATA%d/Port%d/ProfileReadWrite", iInstance, i);
    6050 #endif
    6051 
    6052         ahciPortHwReset(pAhciPort);
    6053     }
     6012        ahciPortHwReset(&pThis->ahciPort[i]);
    60546013
    60556014    /* Attach drivers to every available port. */
  • trunk/src/VBox/Devices/Storage/DrvSCSI.cpp

    r64660 r64841  
    133133     * any of the dummy functions. */
    134134    bool volatile           fDummySignal;
    135     /** Release statistics: number of bytes written. */
    136     STAMCOUNTER             StatBytesWritten;
    137     /** Release statistics: number of bytes read. */
    138     STAMCOUNTER             StatBytesRead;
    139     /** Release statistics: Current I/O depth. */
     135    /** Current I/O depth. */
    140136    volatile uint32_t       StatIoDepth;
    141137    /** Errors printed in the release log. */
     
    358354                pThis->pLed->Asserted.s.fReading = pThis->pLed->Actual.s.fReading = 1;
    359355                rc = pThis->pDrvMediaEx->pfnIoReqRead(pThis->pDrvMediaEx, hIoReq, uOffset, cbTransfer);
    360                 STAM_REL_COUNTER_ADD(&pThis->StatBytesRead, cbTransfer);
    361356            }
    362357            else
     
    364359                pThis->pLed->Asserted.s.fWriting = pThis->pLed->Actual.s.fWriting = 1;
    365360                rc = pThis->pDrvMediaEx->pfnIoReqWrite(pThis->pDrvMediaEx, hIoReq, uOffset, cbTransfer);
    366                 STAM_REL_COUNTER_ADD(&pThis->StatBytesWritten, cbTransfer);
    367361            }
    368362
     
    12541248        pThis->hVScsiLun    = NULL;
    12551249    }
    1256 
    1257     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatBytesRead);
    1258     PDMDrvHlpSTAMDeregister(pDrvIns, &pThis->StatBytesWritten);
    1259     PDMDrvHlpSTAMDeregister(pDrvIns, (void *)&pThis->StatIoDepth);
    12601250}
    12611251
     
    14371427        }
    14381428    }
    1439 
    1440     const char *pszCtrl = NULL;
    1441     uint32_t iCtrlInstance = 0;
    1442     uint32_t iCtrlLun = 0;
    1443 
    1444     rc = pThis->pDevMediaPort->pfnQueryDeviceLocation(pThis->pDevMediaPort, &pszCtrl, &iCtrlInstance, &iCtrlLun);
    1445     if (RT_SUCCESS(rc))
    1446     {
    1447         const char *pszCtrlId =   strcmp(pszCtrl, "Msd") == 0 ? "USB"
    1448                                 : strcmp(pszCtrl, "lsilogicsas") == 0 ? "SAS"
    1449                                 : "SCSI";
    1450         /* Register statistics counter. */
    1451         PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesRead, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,
    1452                                 "Amount of data read.", "/Devices/%s%u/%u/ReadBytes", pszCtrlId, iCtrlInstance, iCtrlLun);
    1453         PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,
    1454                                 "Amount of data written.", "/Devices/%s%u/%u/WrittenBytes", pszCtrlId, iCtrlInstance, iCtrlLun);
    1455         PDMDrvHlpSTAMRegisterF(pDrvIns, (void *)&pThis->StatIoDepth, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    1456                                 "Number of active tasks.", "/Devices/%s%u/%u/IoDepth", pszCtrlId, iCtrlInstance, iCtrlLun);
    1457     }
    1458 
    1459     pThis->StatIoDepth = 0;
    14601429
    14611430    uint32_t fFeatures = 0;
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp

    r64761 r64841  
    284284     */
    285285    CHECK_MEMBER_ALIGNMENT(AHCI, lock, 8);
    286     CHECK_MEMBER_ALIGNMENT(AHCIPort, StatDMA, 8);
     286    CHECK_MEMBER_ALIGNMENT(AHCI, ahciPort[0], 8);
    287287
    288288    CHECK_MEMBER_ALIGNMENT(APICDEV, pDevInsR0, 8);
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r64808 r64841  
    13241324    GEN_CHECK_OFF(AHCIPort, pTaskErr);
    13251325    GEN_CHECK_OFF(AHCIPort, hEvtProcess);
    1326     GEN_CHECK_OFF(AHCIPort, StatDMA);
    1327     GEN_CHECK_OFF(AHCIPort, StatBytesWritten);
    1328     GEN_CHECK_OFF(AHCIPort, StatBytesRead);
    1329     GEN_CHECK_OFF(AHCIPort, StatIORequestsPerSecond);
    1330 #ifdef VBOX_WITH_STATISTICS
    1331     GEN_CHECK_OFF(AHCIPort, StatProfileProcessTime);
    1332     GEN_CHECK_OFF(AHCIPort, StatProfileReadWrite);
    1333 #endif
    13341326    GEN_CHECK_OFF(AHCIPort, szSerialNumber);
    13351327    GEN_CHECK_OFF(AHCIPort, szSerialNumber[AHCI_SERIAL_NUMBER_LENGTH]); /* One additional byte for the termination.*/
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