Changeset 72336 in vbox for trunk/src/VBox
- Timestamp:
- May 25, 2018 9:59:14 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
r72312 r72336 220 220 static const RTTRACELOGEVTITEMDESC g_aEvtItemsReadWrite[] = 221 221 { 222 { "Offset", "Offset to start reading/writing from/to", RTTRACELOGTYPE_UINT64, 0 }, 223 { "Size", "Number of bytes to transfer", RTTRACELOGTYPE_SIZE, 0 } 222 { "Async", "Flag whether the request is asynchronous", RTTRACELOGTYPE_BOOL, 0 }, 223 { "Offset", "Offset to start reading/writing from/to", RTTRACELOGTYPE_UINT64, 0 }, 224 { "Size", "Number of bytes to transfer", RTTRACELOGTYPE_SIZE, 0 } 225 }; 226 227 /** 228 * Flush event items. 229 */ 230 static const RTTRACELOGEVTITEMDESC g_aEvtItemsFlush[] = 231 { 232 { "Async", "Flag whether the request is asynchronous", RTTRACELOGTYPE_BOOL, 0 } 224 233 }; 225 234 … … 240 249 /** Flush event descriptor. */ 241 250 static const RTTRACELOGEVTDESC g_EvtFlush = 242 { "Flush", "Flush written data to disk", RTTRACELOGEVTSEVERITY_DEBUG, 0, NULL};251 { "Flush", "Flush written data to disk", RTTRACELOGEVTSEVERITY_DEBUG, RT_ELEMENTS(g_aEvtItemsFlush), &g_aEvtItemsFlush[0] }; 243 252 /** I/O request complete event descriptor. */ 244 253 static const RTTRACELOGEVTDESC g_EvtComplete = … … 756 765 * @param pThis The driver instance data. 757 766 * @param uGrp The group ID. 767 * @param fAsync Flag whether this is an async request. 758 768 * @param off The offset to put into the event log. 759 769 * @param cbRead Amount of bytes to read. 760 770 */ 761 DECLINLINE(void) drvdiskintTraceLogFireEvtRead(PDRVDISKINTEGRITY pThis, uintptr_t uGrp, uint64_t off, size_t cbRead)771 DECLINLINE(void) drvdiskintTraceLogFireEvtRead(PDRVDISKINTEGRITY pThis, uintptr_t uGrp, bool fAsync, uint64_t off, size_t cbRead) 762 772 { 763 773 if (pThis->hIoLogger) 764 774 { 765 775 int rc = RTTraceLogWrEvtAddL(pThis->hIoLogger, &g_EvtRead, RTTRACELOG_WR_ADD_EVT_F_GRP_START, 766 (RTTRACELOGEVTGRPID)uGrp, 0, off, cbRead);776 (RTTRACELOGEVTGRPID)uGrp, 0, fAsync, off, cbRead); 767 777 AssertRC(rc); 768 778 } … … 776 786 * @param pThis The driver instance data. 777 787 * @param uGrp The group ID. 788 * @param fAsync Flag whether this is an async request. 778 789 * @param off The offset to put into the event log. 779 790 * @param cbWrite Amount of bytes to write. 780 791 */ 781 DECLINLINE(void) drvdiskintTraceLogFireEvtWrite(PDRVDISKINTEGRITY pThis, uintptr_t uGrp, uint64_t off, size_t cbWrite)792 DECLINLINE(void) drvdiskintTraceLogFireEvtWrite(PDRVDISKINTEGRITY pThis, uintptr_t uGrp, bool fAsync, uint64_t off, size_t cbWrite) 782 793 { 783 794 if (pThis->hIoLogger) … … 796 807 * @param pThis The driver instance data. 797 808 * @param uGrp The group ID. 798 */ 799 DECLINLINE(void) drvdiskintTraceLogFireEvtFlush(PDRVDISKINTEGRITY pThis, uintptr_t uGrp) 809 * @param fAsync Flag whether this is an async request. 810 */ 811 DECLINLINE(void) drvdiskintTraceLogFireEvtFlush(PDRVDISKINTEGRITY pThis, uintptr_t uGrp, bool fAsync) 800 812 { 801 813 if (pThis->hIoLogger) … … 848 860 PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface); 849 861 850 drvdiskintTraceLogFireEvtRead(pThis, (uintptr_t)pvBuf, off, cbRead);862 drvdiskintTraceLogFireEvtRead(pThis, (uintptr_t)pvBuf, false /* fAsync */, off, cbRead); 851 863 rc = pThis->pDrvMedia->pfnRead(pThis->pDrvMedia, off, pvBuf, cbRead); 852 864 … … 885 897 PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface); 886 898 887 drvdiskintTraceLogFireEvtWrite(pThis, (uintptr_t)pvBuf, off, cbWrite);899 drvdiskintTraceLogFireEvtWrite(pThis, (uintptr_t)pvBuf, false /* fAsync */, off, cbWrite); 888 900 889 901 if (pThis->fRecordWriteBeforeCompletion) … … 923 935 PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface); 924 936 925 drvdiskintTraceLogFireEvtFlush(pThis, 1 );937 drvdiskintTraceLogFireEvtFlush(pThis, 1, false /* fAsync */); 926 938 rc = pThis->pDrvMedia->pfnFlush(pThis->pDrvMedia); 927 939 drvdiskintTraceLogFireEvtComplete(pThis, 1, rc, NULL); … … 1421 1433 drvdiskintIoReqAdd(pThis, pIoReq); 1422 1434 1423 drvdiskintTraceLogFireEvtRead(pThis, (uintptr_t)hIoReq, off, cbRead);1435 drvdiskintTraceLogFireEvtRead(pThis, (uintptr_t)hIoReq, true /* fAsync */, off, cbRead); 1424 1436 int rc = pThis->pDrvMediaEx->pfnIoReqRead(pThis->pDrvMediaEx, hIoReq, off, cbRead); 1425 1437 if (rc == VINF_SUCCESS) … … 1489 1501 drvdiskintIoReqAdd(pThis, pIoReq); 1490 1502 1491 drvdiskintTraceLogFireEvtWrite(pThis, (uintptr_t)hIoReq, off, cbWrite);1503 drvdiskintTraceLogFireEvtWrite(pThis, (uintptr_t)hIoReq, true /* fAsync */, off, cbWrite); 1492 1504 if (pThis->fRecordWriteBeforeCompletion) 1493 1505 { … … 1536 1548 drvdiskintIoReqAdd(pThis, pIoReq); 1537 1549 1538 drvdiskintTraceLogFireEvtFlush(pThis, (uintptr_t)hIoReq );1550 drvdiskintTraceLogFireEvtFlush(pThis, (uintptr_t)hIoReq, true /* fAsync */); 1539 1551 int rc = pThis->pDrvMediaEx->pfnIoReqFlush(pThis->pDrvMediaEx, hIoReq); 1540 1552 if (rc == VINF_SUCCESS)
Note:
See TracChangeset
for help on using the changeset viewer.