- Timestamp:
- Jul 31, 2018 12:36:41 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r72474 r73410 219 219 STAMPROFILE StatRxOverflow; 220 220 STAMCOUNTER StatRxOverflowWakeup; 221 STAMCOUNTER StatTransmitByNetwork; 222 STAMCOUNTER StatTransmitByThread; 221 223 #endif /* VBOX_WITH_STATISTICS */ 222 224 /** @} */ … … 1420 1422 { 1421 1423 PVNETSTATE pThis = RT_FROM_MEMBER(pInterface, VNETSTATE, INetworkDown); 1424 STAM_REL_COUNTER_INC(&pThis->StatTransmitByNetwork); 1422 1425 vnetTransmitPendingPackets(pThis, pThis->pTxQueue, false /*fOnWorkerThread*/); 1423 1426 } … … 1511 1514 if (RT_UNLIKELY(pThread->enmState != PDMTHREADSTATE_RUNNING)) 1512 1515 break; 1513 vnetTransmitPendingPackets(pThis, pThis->pTxQueue, false /*fOnWorkerThread*/); /// @todo shouldn't it be true instead? 1514 Log(("vnetTxThread: enable kicking and get to sleep\n")); 1515 vringSetNotification(&pThis->VPCI, &pThis->pTxQueue->VRing, true); 1516 STAM_REL_COUNTER_INC(&pThis->StatTransmitByThread); 1517 while (true) 1518 { 1519 vnetTransmitPendingPackets(pThis, pThis->pTxQueue, false /*fOnWorkerThread*/); /// @todo shouldn't it be true instead? 1520 Log(("vnetTxThread: enable kicking and get to sleep\n")); 1521 vringSetNotification(&pThis->VPCI, &pThis->pTxQueue->VRing, true); 1522 if (vqueueIsEmpty(&pThis->VPCI, pThis->pTxQueue)) 1523 break; 1524 vringSetNotification(&pThis->VPCI, &pThis->pTxQueue->VRing, false); 1525 } 1516 1526 } 1517 1527 … … 2321 2331 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmit, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in HC", "/Devices/VNet%d/Transmit/Total", iInstance); 2322 2332 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitSend, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling send transmit in HC", "/Devices/VNet%d/Transmit/Send", iInstance); 2333 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitByNetwork, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Network-initiated transmissions", "/Devices/VNet%d/Transmit/ByNetwork", iInstance); 2334 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitByThread, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Thread-initiated transmissions", "/Devices/VNet%d/Transmit/ByThread", iInstance); 2323 2335 #endif /* VBOX_WITH_STATISTICS */ 2324 2336 -
trunk/src/VBox/Devices/VirtIO/Virtio.cpp
r73097 r73410 385 385 VPCISTATE *pState = PDMINS_2_DATA(pDevIns, VPCISTATE *); 386 386 int rc = VINF_SUCCESS; 387 STAM_PROFILE_ADV_START(&pState->CTX SUFF(StatIORead), a);387 STAM_PROFILE_ADV_START(&pState->CTX_SUFF(StatIORead), a); 388 388 RT_NOREF_PV(pvUser); 389 389 … … 400 400 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 401 401 { 402 STAM_PROFILE_ADV_STOP(&pState->CTX SUFF(StatIORead), a);402 STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF(StatIORead), a); 403 403 return rc; 404 404 }*/ … … 455 455 } 456 456 Log3(("%s vpciIOPortIn: At %RTiop in %0*x\n", INSTANCE(pState), Port, cb*2, *pu32)); 457 STAM_PROFILE_ADV_STOP(&pState->CTX SUFF(StatIORead), a);457 STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF(StatIORead), a); 458 458 //vpciCsLeave(pState); 459 459 return rc; … … 484 484 int rc = VINF_SUCCESS; 485 485 bool fHasBecomeReady; 486 STAM_PROFILE_ADV_START(&pState->CTX SUFF(StatIOWrite), a);486 STAM_PROFILE_ADV_START(&pState->CTX_SUFF(StatIOWrite), a); 487 487 RT_NOREF_PV(pvUser); 488 488 … … 604 604 } 605 605 606 STAM_PROFILE_ADV_STOP(&pState->CTX SUFF(StatIOWrite), a);606 STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF(StatIOWrite), a); 607 607 return rc; 608 608 } … … 932 932 933 933 #if defined(VBOX_WITH_STATISTICS) 934 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in GC", vpciCounter(pcszNameFmt, "IO/ReadGC"), iInstance); 935 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in HC", vpciCounter(pcszNameFmt, "IO/ReadHC"), iInstance); 936 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in GC", vpciCounter(pcszNameFmt, "IO/WriteGC"), iInstance); 937 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in HC", vpciCounter(pcszNameFmt, "IO/WriteHC"), iInstance); 934 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in R3", vpciCounter(pcszNameFmt, "IO/ReadR3"), iInstance); 935 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadR0, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in R0", vpciCounter(pcszNameFmt, "IO/ReadR0"), iInstance); 936 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadRC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in RC", vpciCounter(pcszNameFmt, "IO/ReadRC"), iInstance); 937 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in R3", vpciCounter(pcszNameFmt, "IO/WriteR3"), iInstance); 938 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteR0, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in R0", vpciCounter(pcszNameFmt, "IO/WriteR0"), iInstance); 939 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteRC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in RC", vpciCounter(pcszNameFmt, "IO/WriteRC"), iInstance); 938 940 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIntsRaised, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of raised interrupts", vpciCounter(pcszNameFmt, "Interrupts/Raised"), iInstance); 939 941 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIntsSkipped, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of skipped interrupts", vpciCounter(pcszNameFmt, "Interrupts/Skipped"), iInstance); 940 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatCsGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in GC", vpciCounter(pcszNameFmt, "Cs/CsGC"), iInstance); 941 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatCsHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in HC", vpciCounter(pcszNameFmt, "Cs/CsHC"), iInstance); 942 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatCsR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in R3", vpciCounter(pcszNameFmt, "Cs/CsR3"), iInstance); 943 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatCsR0, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in R0", vpciCounter(pcszNameFmt, "Cs/CsR0"), iInstance); 944 PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatCsRC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in RC", vpciCounter(pcszNameFmt, "Cs/CsRC"), iInstance); 942 945 #endif /* VBOX_WITH_STATISTICS */ 943 946 -
trunk/src/VBox/Devices/VirtIO/Virtio.h
r73097 r73410 213 213 214 214 #if defined(VBOX_WITH_STATISTICS) 215 STAMPROFILEADV StatIOReadGC; 216 STAMPROFILEADV StatIOReadHC; 217 STAMPROFILEADV StatIOWriteGC; 218 STAMPROFILEADV StatIOWriteHC; 215 STAMPROFILEADV StatIOReadR3; 216 STAMPROFILEADV StatIOReadR0; 217 STAMPROFILEADV StatIOReadRC; 218 STAMPROFILEADV StatIOWriteR3; 219 STAMPROFILEADV StatIOWriteR0; 220 STAMPROFILEADV StatIOWriteRC; 219 221 STAMCOUNTER StatIntsRaised; 220 222 STAMCOUNTER StatIntsSkipped; 221 STAMPROFILE StatCsGC; 222 STAMPROFILE StatCsHC; 223 STAMPROFILE StatCsR3; 224 STAMPROFILE StatCsR0; 225 STAMPROFILE StatCsRC; 223 226 #endif /* VBOX_WITH_STATISTICS */ 224 227 } VPCISTATE; … … 276 279 { 277 280 #ifdef VPCI_CS 278 STAM_PROFILE_START(&pState->CTX SUFF(StatCs), a);281 STAM_PROFILE_START(&pState->CTX_SUFF(StatCs), a); 279 282 int rc = PDMCritSectEnter(&pState->cs, rcBusy); 280 STAM_PROFILE_STOP(&pState->CTX SUFF(StatCs), a);283 STAM_PROFILE_STOP(&pState->CTX_SUFF(StatCs), a); 281 284 return rc; 282 285 #else
Note:
See TracChangeset
for help on using the changeset viewer.