Changeset 93468 in vbox
- Timestamp:
- Jan 27, 2022 9:17:12 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149580
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/stam.h
r93115 r93468 1341 1341 * @param pvSample Pointer to the data. enmType indicates the format of this data. 1342 1342 * @param enmUnit The unit. 1343 * @param pszUnit The unit as string. This is a permanent string, 1344 * same as returned by STAMR3GetUnit(). 1343 1345 * @param enmVisibility The visibility. 1344 1346 * @param pszDesc The description. … … 1346 1348 */ 1347 1349 typedef DECLCALLBACKTYPE(int, FNSTAMR3ENUM,(const char *pszName, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, 1348 STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser));1350 const char *pszUnit, STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser)); 1349 1351 /** Pointer to a FNSTAMR3ENUM(). */ 1350 1352 typedef FNSTAMR3ENUM *PFNSTAMR3ENUM; -
trunk/src/VBox/Debugger/Makefile.kmk
r93115 r93468 114 114 VBoxDbgConsole.cpp \ 115 115 VBoxDbgStatsQt.cpp 116 VBoxDbg_LIBS = \117 $(VBOX_LIB_VMM_LAZY)118 116 VBoxDbg_LDFLAGS.darwin = \ 119 117 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDbg.dylib -
trunk/src/VBox/Debugger/VBoxDbg.cpp
r93460 r93468 151 151 { 152 152 AssertPtrReturn(pUVM, VERR_INVALID_POINTER); 153 AssertPtrReturn(VMR3RetainUVM(pUVM) != UINT32_MAX, VERR_INVALID_POINTER); 153 AssertPtrReturn(pVMM, VERR_INVALID_POINTER); 154 AssertReturn(VMMR3VTABLE_IS_COMPATIBLE(pVMM->uMagicVersion), VERR_VERSION_MISMATCH); 155 AssertReturn(pVMM->pfnVMR3RetainUVM(pUVM) != UINT32_MAX, VERR_INVALID_POINTER); 154 156 155 157 int rc = dbgGuiCreate(NULL, pUVM, pVMM, ppGui, ppGuiVT); 156 158 157 VMR3ReleaseUVM(pUVM);159 pVMM->pfnVMR3ReleaseUVM(pUVM); 158 160 return rc; 159 161 } -
trunk/src/VBox/Debugger/VBoxDbgBase.cpp
r93444 r93468 34 34 35 35 VBoxDbgBase::VBoxDbgBase(VBoxDbgGui *a_pDbgGui) 36 : m_pDbgGui(a_pDbgGui), m_pUVM(NULL), m_ hGUIThread(RTThreadNativeSelf())36 : m_pDbgGui(a_pDbgGui), m_pUVM(NULL), m_pVMM(NULL), m_hGUIThread(RTThreadNativeSelf()) 37 37 { 38 38 NOREF(m_pDbgGui); /* shut up warning. */ … … 42 42 */ 43 43 m_pUVM = a_pDbgGui->getUvmHandle(); 44 if (m_pUVM) 45 { 46 VMR3RetainUVM(m_pUVM); 47 48 int rc = VMR3AtStateRegister(m_pUVM, atStateChange, this); 44 m_pVMM = a_pDbgGui->getVMMFunctionTable(); 45 if (m_pUVM && m_pVMM) 46 { 47 m_pVMM->pfnVMR3RetainUVM(m_pUVM); 48 49 int rc = m_pVMM->pfnVMR3AtStateRegister(m_pUVM, atStateChange, this); 49 50 AssertRC(rc); 50 51 } … … 58 59 */ 59 60 /** @todo need to do some locking here? */ 60 PUVM pUVM = ASMAtomicXchgPtrT(&m_pUVM, NULL, PUVM); 61 if (pUVM) 62 { 63 int rc = VMR3AtStateDeregister(pUVM, atStateChange, this); 61 PUVM pUVM = ASMAtomicXchgPtrT(&m_pUVM, NULL, PUVM); 62 PCVMMR3VTABLE pVMM = ASMAtomicXchgPtrT(&m_pVMM, NULL, PCVMMR3VTABLE); 63 if (pUVM && pVMM) 64 { 65 int rc = pVMM->pfnVMR3AtStateDeregister(pUVM, atStateChange, this); 64 66 AssertRC(rc); 65 67 66 VMR3ReleaseUVM(pUVM);68 pVMM->pfnVMR3ReleaseUVM(pUVM); 67 69 } 68 70 } … … 74 76 QByteArray Utf8Array = rPat.toUtf8(); 75 77 const char *pszPat = !rPat.isEmpty() ? Utf8Array.constData() : NULL; 76 PUVM pUVM = m_pUVM; 77 if ( pUVM 78 && VMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 79 return STAMR3Reset(pUVM, pszPat); 78 PUVM pUVM = m_pUVM; 79 PCVMMR3VTABLE pVMM = m_pVMM; 80 if ( pUVM 81 && pVMM 82 && pVMM->pfnVMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 83 return pVMM->pfnSTAMR3Reset(pUVM, pszPat); 80 84 return VERR_INVALID_HANDLE; 81 85 } … … 87 91 QByteArray Utf8Array = rPat.toUtf8(); 88 92 const char *pszPat = !rPat.isEmpty() ? Utf8Array.constData() : NULL; 89 PUVM pUVM = m_pUVM; 90 if ( pUVM 91 && VMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 92 return STAMR3Enum(pUVM, pszPat, pfnEnum, pvUser); 93 PUVM pUVM = m_pUVM; 94 PCVMMR3VTABLE pVMM = m_pVMM; 95 if ( pUVM 96 && pVMM 97 && pVMM->pfnVMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 98 return pVMM->pfnSTAMR3Enum(pUVM, pszPat, pfnEnum, pvUser); 93 99 return VERR_INVALID_HANDLE; 94 100 } … … 98 104 VBoxDbgBase::dbgcCreate(PCDBGCIO pIo, unsigned fFlags) 99 105 { 100 PUVM pUVM = m_pUVM; 101 if ( pUVM 102 && VMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 103 return DBGCCreate(pUVM, pIo, fFlags); 106 PUVM pUVM = m_pUVM; 107 PCVMMR3VTABLE pVMM = m_pVMM; 108 if ( pUVM 109 && pVMM 110 && pVMM->pfnVMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 111 return pVMM->pfnDBGCCreate(pUVM, pIo, fFlags); 104 112 return VERR_INVALID_HANDLE; 105 113 } … … 107 115 108 116 /*static*/ DECLCALLBACK(void) 109 VBoxDbgBase::atStateChange(PUVM pUVM, PCVMMR3VTABLE /*pVMM*/, VMSTATE enmState, VMSTATE /*enmOldState*/, void *pvUser)117 VBoxDbgBase::atStateChange(PUVM pUVM, PCVMMR3VTABLE pVMM, VMSTATE enmState, VMSTATE /*enmOldState*/, void *pvUser) 110 118 { 111 119 VBoxDbgBase *pThis = (VBoxDbgBase *)pvUser; NOREF(pUVM); … … 115 123 { 116 124 /** @todo need to do some locking here? */ 117 PUVM pUVM2 = ASMAtomicXchgPtrT(&pThis->m_pUVM, NULL, PUVM); 118 if (pUVM2) 125 PUVM pUVM2 = ASMAtomicXchgPtrT(&pThis->m_pUVM, NULL, PUVM); 126 PCVMMR3VTABLE pVMM2 = ASMAtomicXchgPtrT(&pThis->m_pVMM, NULL, PCVMMR3VTABLE); 127 if (pUVM2 && pVMM2) 119 128 { 120 129 Assert(pUVM2 == pUVM); 130 Assert(pVMM2 == pVMM); 121 131 pThis->sigTerminated(); 122 VMR3ReleaseUVM(pUVM2);132 pVMM->pfnVMR3ReleaseUVM(pUVM2); 123 133 } 124 134 break; … … 132 142 break; 133 143 } 144 RT_NOREF(pVMM); 134 145 } 135 146 -
trunk/src/VBox/Debugger/VBoxDbgBase.h
r93460 r93468 115 115 /** The user mode VM handle. */ 116 116 PUVM volatile m_pUVM; 117 /** The VMM function table. */ 118 PCVMMR3VTABLE volatile m_pVMM; 117 119 /** The handle of the GUI thread. */ 118 120 RTNATIVETHREAD m_hGUIThread; -
trunk/src/VBox/Debugger/VBoxDbgGui.h
r93460 r93468 143 143 { 144 144 return m_pUVM; 145 } 146 147 /** 148 * Gets the VMM function table. 149 * @returns The VMM function table. 150 */ 151 PCVMMR3VTABLE getVMMFunctionTable() const 152 { 153 return m_pVMM; 145 154 } 146 155 -
trunk/src/VBox/Debugger/VBoxDbgStatsQt.cpp
r93115 r93468 41 41 #include <iprt/mem.h> 42 42 #include <iprt/assert.h> 43 44 #include "VBoxDbgGui.h" 43 45 44 46 … … 102 104 /** Our index among the parent's children. */ 103 105 uint32_t iSelf; 104 /** The unit .*/105 STAMUNIT enmUnit;106 /** The unit string. (not allocated) */ 107 const char *pszUnit; 106 108 /** The data type. 107 109 * For filler nodes not containing data, this will be set to STAMTYPE_INVALID. */ … … 309 311 * Initializes a pristine node. 310 312 */ 311 static int initNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, const char *pszDesc);313 static int initNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, const char *pszUnit, const char *pszDesc); 312 314 313 315 /** 314 316 * Updates (or reinitializes if you like) a node. 315 317 */ 316 static void updateNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, const char *pszDesc);318 static void updateNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, const char *pszUnit, const char *pszDesc); 317 319 318 320 /** … … 362 364 * @copydoc FNSTAMR3ENUM */ 363 365 static DECLCALLBACK(int) updateCallback(const char *pszName, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, 364 STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser);366 const char *pszUnit, STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser); 365 367 366 368 /** … … 581 583 * @param a_rPatStr The selection pattern. 582 584 * @param a_pParent The parent object. NULL is fine. 583 */ 584 VBoxDbgStatsModelVM(VBoxDbgGui *a_pDbgGui, QString &a_rPatStr, QObject *a_pParent); 585 * @param a_pVMM The VMM function table. 586 */ 587 VBoxDbgStatsModelVM(VBoxDbgGui *a_pDbgGui, QString &a_rPatStr, QObject *a_pParent, PCVMMR3VTABLE pVMM); 585 588 586 589 /** Destructor */ … … 595 598 */ 596 599 static DECLCALLBACK(int) createNewTreeCallback(const char *pszName, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, 597 STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser); 600 const char *pszUnit, STAMVISIBILITY enmVisibility, const char *pszDesc, 601 void *pvUser); 598 602 599 603 /** … … 605 609 */ 606 610 PDBGGUISTATSNODE createNewTree(QString &a_rPatStr); 611 612 /** The VMM function table. */ 613 PCVMMR3VTABLE m_pVMM; 607 614 }; 608 615 … … 821 828 a_pNode->cChildren = 0; 822 829 a_pNode->iSelf = UINT32_MAX; 823 a_pNode-> enmUnit = STAMUNIT_INVALID;830 a_pNode->pszUnit = ""; 824 831 a_pNode->enmType = STAMTYPE_INVALID; 825 832 … … 856 863 pRoot->iSelf = 0; 857 864 pRoot->enmType = STAMTYPE_INVALID; 858 pRoot-> enmUnit = STAMUNIT_INVALID;865 pRoot->pszUnit = ""; 859 866 pRoot->pszName = (char *)RTMemDup("/", sizeof("/")); 860 867 pRoot->cchName = 1; … … 876 883 pNode->iSelf = UINT32_MAX; 877 884 pNode->enmType = STAMTYPE_INVALID; 878 pNode-> enmUnit = STAMUNIT_INVALID;885 pNode->pszUnit = ""; 879 886 pNode->pszName = (char *)RTMemDupEx(pszName, cchName, 1); 880 887 pNode->cchName = cchName; … … 1059 1066 1060 1067 /*static*/ int 1061 VBoxDbgStatsModel::initNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, const char *pszDesc) 1068 VBoxDbgStatsModel::initNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, 1069 const char *pszUnit, const char *pszDesc) 1062 1070 { 1063 1071 /* 1064 1072 * Copy the data. 1065 1073 */ 1066 pNode-> enmUnit = enmUnit;1074 pNode->pszUnit = pszUnit; 1067 1075 Assert(pNode->enmType == STAMTYPE_INVALID); 1068 1076 pNode->enmType = enmType; … … 1138 1146 1139 1147 /*static*/ void 1140 VBoxDbgStatsModel::updateNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, const char *pszDesc) 1141 { 1142 1148 VBoxDbgStatsModel::updateNode(PDBGGUISTATSNODE pNode, STAMTYPE enmType, void *pvSample, const char *pszUnit, const char *pszDesc) 1149 { 1143 1150 /* 1144 1151 * Reset and init the node if the type changed. … … 1148 1155 if (pNode->enmType != STAMTYPE_INVALID) 1149 1156 resetNode(pNode); 1150 initNode(pNode, enmType, pvSample, enmUnit, pszDesc);1157 initNode(pNode, enmType, pvSample, pszUnit, pszDesc); 1151 1158 pNode->enmState = kDbgGuiStatsNodeState_kRefresh; 1152 1159 } … … 1764 1771 /*static*/ DECLCALLBACK(int) 1765 1772 VBoxDbgStatsModel::updateCallback(const char *pszName, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, 1766 STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser)1773 const char *pszUnit, STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser) 1767 1774 { 1768 1775 VBoxDbgStatsModelVM *pThis = (VBoxDbgStatsModelVM *)pvUser; 1769 1776 Log3(("updateCallback: %s\n", pszName)); 1777 RT_NOREF(enmUnit); 1770 1778 1771 1779 /* … … 1805 1813 * Perform the update and advance to the next one. 1806 1814 */ 1807 updateNode(pNode, enmType, pvSample, enmUnit, pszDesc);1815 updateNode(pNode, enmType, pvSample, pszUnit, pszDesc); 1808 1816 pThis->updateCallbackAdvance(pNode); 1809 1817 … … 2230 2238 VBoxDbgStatsModel::strUnit(PCDBGGUISTATSNODE pNode) 2231 2239 { 2232 if (pNode->enmUnit == STAMUNIT_INVALID) 2233 return ""; 2234 return STAMR3GetUnit(pNode->enmUnit); 2240 return pNode->pszUnit; 2235 2241 } 2236 2242 … … 2512 2518 { 2513 2519 case STAMTYPE_COUNTER: 2514 RTStrPrintf(szBuf, sizeof(szBuf), "%8llu %s", a_pNode->Data.Counter.c, STAMR3GetUnit(a_pNode->enmUnit));2520 RTStrPrintf(szBuf, sizeof(szBuf), "%8llu %s", a_pNode->Data.Counter.c, a_pNode->pszUnit); 2515 2521 break; 2516 2522 … … 2521 2527 RTStrPrintf(szBuf, sizeof(szBuf), 2522 2528 "%8llu %s (%12llu ticks, %7llu times, max %9llu, min %7lld)", 2523 a_pNode->Data.Profile.cTicks / u64, STAMR3GetUnit(a_pNode->enmUnit),2529 a_pNode->Data.Profile.cTicks / u64, a_pNode->pszUnit, 2524 2530 a_pNode->Data.Profile.cTicks, a_pNode->Data.Profile.cPeriods, a_pNode->Data.Profile.cTicksMax, a_pNode->Data.Profile.cTicksMin); 2525 2531 break; … … 2530 2536 RTStrPrintf(szBuf, sizeof(szBuf), 2531 2537 "%8u:%-8u %s", 2532 a_pNode->Data.RatioU32.u32A, a_pNode->Data.RatioU32.u32B, STAMR3GetUnit(a_pNode->enmUnit));2538 a_pNode->Data.RatioU32.u32A, a_pNode->Data.RatioU32.u32B, a_pNode->pszUnit); 2533 2539 break; 2534 2540 … … 2536 2542 if (a_pNode->Data.pStr) 2537 2543 a_rString += *a_pNode->Data.pStr; 2538 RTStrPrintf(szBuf, sizeof(szBuf), " %s", STAMR3GetUnit(a_pNode->enmUnit));2544 RTStrPrintf(szBuf, sizeof(szBuf), " %s", a_pNode->pszUnit); 2539 2545 break; 2540 2546 2541 2547 case STAMTYPE_U8: 2542 2548 case STAMTYPE_U8_RESET: 2543 RTStrPrintf(szBuf, sizeof(szBuf), "%8u %s", a_pNode->Data.u8, STAMR3GetUnit(a_pNode->enmUnit));2549 RTStrPrintf(szBuf, sizeof(szBuf), "%8u %s", a_pNode->Data.u8, a_pNode->pszUnit); 2544 2550 break; 2545 2551 2546 2552 case STAMTYPE_X8: 2547 2553 case STAMTYPE_X8_RESET: 2548 RTStrPrintf(szBuf, sizeof(szBuf), "%8x %s", a_pNode->Data.u8, STAMR3GetUnit(a_pNode->enmUnit));2554 RTStrPrintf(szBuf, sizeof(szBuf), "%8x %s", a_pNode->Data.u8, a_pNode->pszUnit); 2549 2555 break; 2550 2556 2551 2557 case STAMTYPE_U16: 2552 2558 case STAMTYPE_U16_RESET: 2553 RTStrPrintf(szBuf, sizeof(szBuf), "%8u %s", a_pNode->Data.u16, STAMR3GetUnit(a_pNode->enmUnit));2559 RTStrPrintf(szBuf, sizeof(szBuf), "%8u %s", a_pNode->Data.u16, a_pNode->pszUnit); 2554 2560 break; 2555 2561 2556 2562 case STAMTYPE_X16: 2557 2563 case STAMTYPE_X16_RESET: 2558 RTStrPrintf(szBuf, sizeof(szBuf), "%8x %s", a_pNode->Data.u16, STAMR3GetUnit(a_pNode->enmUnit));2564 RTStrPrintf(szBuf, sizeof(szBuf), "%8x %s", a_pNode->Data.u16, a_pNode->pszUnit); 2559 2565 break; 2560 2566 2561 2567 case STAMTYPE_U32: 2562 2568 case STAMTYPE_U32_RESET: 2563 RTStrPrintf(szBuf, sizeof(szBuf), "%8u %s", a_pNode->Data.u32, STAMR3GetUnit(a_pNode->enmUnit));2569 RTStrPrintf(szBuf, sizeof(szBuf), "%8u %s", a_pNode->Data.u32, a_pNode->pszUnit); 2564 2570 break; 2565 2571 2566 2572 case STAMTYPE_X32: 2567 2573 case STAMTYPE_X32_RESET: 2568 RTStrPrintf(szBuf, sizeof(szBuf), "%8x %s", a_pNode->Data.u32, STAMR3GetUnit(a_pNode->enmUnit));2574 RTStrPrintf(szBuf, sizeof(szBuf), "%8x %s", a_pNode->Data.u32, a_pNode->pszUnit); 2569 2575 break; 2570 2576 2571 2577 case STAMTYPE_U64: 2572 2578 case STAMTYPE_U64_RESET: 2573 RTStrPrintf(szBuf, sizeof(szBuf), "%8llu %s", a_pNode->Data.u64, STAMR3GetUnit(a_pNode->enmUnit));2579 RTStrPrintf(szBuf, sizeof(szBuf), "%8llu %s", a_pNode->Data.u64, a_pNode->pszUnit); 2574 2580 break; 2575 2581 2576 2582 case STAMTYPE_X64: 2577 2583 case STAMTYPE_X64_RESET: 2578 RTStrPrintf(szBuf, sizeof(szBuf), "%8llx %s", a_pNode->Data.u64, STAMR3GetUnit(a_pNode->enmUnit));2584 RTStrPrintf(szBuf, sizeof(szBuf), "%8llx %s", a_pNode->Data.u64, a_pNode->pszUnit); 2579 2585 break; 2580 2586 2581 2587 case STAMTYPE_BOOL: 2582 2588 case STAMTYPE_BOOL_RESET: 2583 RTStrPrintf(szBuf, sizeof(szBuf), "%s %s", a_pNode->Data.f ? "true " : "false ", STAMR3GetUnit(a_pNode->enmUnit));2589 RTStrPrintf(szBuf, sizeof(szBuf), "%s %s", a_pNode->Data.f ? "true " : "false ", a_pNode->pszUnit); 2584 2590 break; 2585 2591 … … 2678 2684 2679 2685 2680 VBoxDbgStatsModelVM::VBoxDbgStatsModelVM(VBoxDbgGui *a_pDbgGui, QString &a_rPatStr, QObject *a_pParent )2681 : VBoxDbgStatsModel(a_pParent), VBoxDbgBase(a_pDbgGui) 2686 VBoxDbgStatsModelVM::VBoxDbgStatsModelVM(VBoxDbgGui *a_pDbgGui, QString &a_rPatStr, QObject *a_pParent, PCVMMR3VTABLE pVMM) 2687 : VBoxDbgStatsModel(a_pParent), VBoxDbgBase(a_pDbgGui), m_pVMM(pVMM) 2682 2688 { 2683 2689 /* … … 2722 2728 /*static*/ DECLCALLBACK(int) 2723 2729 VBoxDbgStatsModelVM::createNewTreeCallback(const char *pszName, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit, 2724 STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser)2730 const char *pszUnit, STAMVISIBILITY enmVisibility, const char *pszDesc, void *pvUser) 2725 2731 { 2726 2732 PDBGGUISTATSNODE pRoot = (PDBGGUISTATSNODE)pvUser; 2727 2733 Log3(("createNewTreeCallback: %s\n", pszName)); 2734 RT_NOREF(enmUnit); 2728 2735 2729 2736 /* … … 2768 2775 * Save the data. 2769 2776 */ 2770 return initNode(pNode, enmType, pvSample, enmUnit, pszDesc);2777 return initNode(pNode, enmType, pvSample, pszUnit, pszDesc); 2771 2778 } 2772 2779 … … 3200 3207 * Create the tree view and setup the layout. 3201 3208 */ 3202 VBoxDbgStatsModelVM *pModel = new VBoxDbgStatsModelVM(a_pDbgGui, m_PatStr, NULL );3209 VBoxDbgStatsModelVM *pModel = new VBoxDbgStatsModelVM(a_pDbgGui, m_PatStr, NULL, a_pDbgGui->getVMMFunctionTable()); 3203 3210 m_pView = new VBoxDbgStatsView(a_pDbgGui, pModel, this); 3204 3211 -
trunk/src/VBox/Main/include/GuestImpl.h
r93166 r93468 189 189 void i_updateStats(uint64_t iTick); 190 190 static DECLCALLBACK(int) i_staticEnumStatsCallback(const char *pszName, STAMTYPE enmType, void *pvSample, 191 STAMUNIT enmUnit, STAMVISIBILITY enmVisiblity,191 STAMUNIT enmUnit, const char *pszUnit, STAMVISIBILITY enmVisiblity, 192 192 const char *pszDesc, void *pvUser); 193 193 -
trunk/src/VBox/Main/src-client/GuestImpl.cpp
r93444 r93468 219 219 /* static */ 220 220 DECLCALLBACK(int) Guest::i_staticEnumStatsCallback(const char *pszName, STAMTYPE enmType, void *pvSample, 221 STAMUNIT enmUnit, STAMVISIBILITY enmVisiblity,221 STAMUNIT enmUnit, const char *pszUnit, STAMVISIBILITY enmVisiblity, 222 222 const char *pszDesc, void *pvUser) 223 223 { 224 RT_NOREF(enmVisiblity, pszDesc );224 RT_NOREF(enmVisiblity, pszDesc, pszUnit); 225 225 AssertLogRelMsgReturn(enmType == STAMTYPE_COUNTER, ("Unexpected sample type %d ('%s')\n", enmType, pszName), VINF_SUCCESS); 226 226 AssertLogRelMsgReturn(enmUnit == STAMUNIT_BYTES, ("Unexpected sample unit %d ('%s')\n", enmUnit, pszName), VINF_SUCCESS); -
trunk/src/VBox/VMM/VMMR3/STAM.cpp
r93115 r93468 2593 2593 { 2594 2594 PSTAMR3ENUMONEARGS pArgs = (PSTAMR3ENUMONEARGS)pvArg; 2595 const char *pszUnit = STAMR3GetUnit(pDesc->enmUnit); 2595 2596 int rc; 2596 2597 if (pDesc->enmType == STAMTYPE_CALLBACK) … … 2599 2600 char szBuf[512]; 2600 2601 pDesc->u.Callback.pfnPrint(pArgs->pVM, pDesc->u.Callback.pvSample, szBuf, sizeof(szBuf)); 2601 rc = pArgs->pfnEnum(pDesc->pszName, pDesc->enmType, szBuf, pDesc->enmUnit, 2602 rc = pArgs->pfnEnum(pDesc->pszName, pDesc->enmType, szBuf, pDesc->enmUnit, pszUnit, 2602 2603 pDesc->enmVisibility, pDesc->pszDesc, pArgs->pvUser); 2603 2604 } 2604 2605 else 2605 rc = pArgs->pfnEnum(pDesc->pszName, pDesc->enmType, pDesc->u.pv, pDesc->enmUnit, 2606 rc = pArgs->pfnEnum(pDesc->pszName, pDesc->enmType, pDesc->u.pv, pDesc->enmUnit, pszUnit, 2606 2607 pDesc->enmVisibility, pDesc->pszDesc, pArgs->pvUser); 2607 2608 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.