Changeset 59151 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Dec 16, 2015 1:23:21 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104734
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r58132 r59151 1040 1040 } 1041 1041 1042 /* Register statistics counter. */ 1043 /** @todo aeichner: Find a way to put the instance number of the attached 1044 * controller device when we support more than one controller of the same type. 1045 * At the moment we have the 0 hardcoded. */ 1046 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesRead, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 1047 "Amount of data read.", "/Devices/SCSI0/%d/ReadBytes", pDrvIns->iInstance); 1048 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 1049 "Amount of data written.", "/Devices/SCSI0/%d/WrittenBytes", pDrvIns->iInstance); 1042 const char *pszCtrl = NULL; 1043 uint32_t iCtrlInstance = 0; 1044 uint32_t iCtrlLun = 0; 1045 1046 rc = pThis->pDevScsiPort->pfnQueryDeviceLocation(pThis->pDevScsiPort, &pszCtrl, &iCtrlInstance, &iCtrlLun); 1047 if (RT_SUCCESS(rc)) 1048 { 1049 const char *pszCtrlId = strcmp(pszCtrl, "Msd") == 0 ? "USB" 1050 : strcmp(pszCtrl, "lsilogicsas") == 0 ? "SAS" 1051 : "SCSI"; 1052 /* Register statistics counter. */ 1053 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesRead, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 1054 "Amount of data read.", "/Devices/%s%u/%d/ReadBytes", pszCtrlId, iCtrlInstance, iCtrlLun); 1055 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 1056 "Amount of data written.", "/Devices/%s%u/%d/WrittenBytes", pszCtrlId, iCtrlInstance, iCtrlLun); 1057 } 1050 1058 1051 1059 pThis->StatIoDepth = 0;
Note:
See TracChangeset
for help on using the changeset viewer.