Changeset 88306 in vbox
- Timestamp:
- Mar 26, 2021 9:17:46 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143523
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r88290 r88306 2349 2349 2350 2350 /** Current PDMDEVHLPR3 version number. */ 2351 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 47, 0)2351 #define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE_PP(0xffe7, 47, 1) 2352 2352 2353 2353 /** … … 4262 4262 /** Space reserved for future members. 4263 4263 * @{ */ 4264 DECLR3CALLBACKMEMBER(void, pfnReserved1,(void)); 4264 /** 4265 * Deregister zero or more samples given their name prefix. 4266 * 4267 * @returns VBox status code. 4268 * @param pDevIns The device instance. 4269 * @param pszPrefix The name prefix of the samples to remove. If this does 4270 * not start with a '/', the default prefix will be 4271 * prepended, otherwise it will be used as-is. 4272 */ 4273 DECLR3CALLBACKMEMBER(int, pfnSTAMDeregisterByPrefix,(PPDMDEVINS pDevIns, const char *pszPrefix)); 4265 4274 DECLR3CALLBACKMEMBER(void, pfnReserved2,(void)); 4266 4275 DECLR3CALLBACKMEMBER(void, pfnReserved3,(void)); … … 6855 6864 6856 6865 /** 6866 * @copydoc PDMDEVHLPR3::pfnSTAMDeregisterByPrefix 6867 */ 6868 DECLINLINE(int) PDMDevHlpSTAMDeregisterByPrefix(PPDMDEVINS pDevIns, const char *pszPrefix) 6869 { 6870 return pDevIns->pHlpR3->pfnSTAMDeregisterByPrefix(pDevIns, pszPrefix); 6871 } 6872 6873 /** 6857 6874 * Registers the device with the default PCI bus. 6858 6875 * -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r88290 r88306 1298 1298 } 1299 1299 AssertRC(rc); 1300 } 1301 1302 1303 /** 1304 * @interface_method_impl{PDMDEVHLPR3,pfnSTAMDeregisterByPrefix} 1305 */ 1306 static DECLCALLBACK(int) pdmR3DevHlp_STAMDeregisterByPrefix(PPDMDEVINS pDevIns, const char *pszPrefix) 1307 { 1308 PDMDEV_ASSERT_DEVINS(pDevIns); 1309 PVM pVM = pDevIns->Internal.s.pVMR3; 1310 VM_ASSERT_EMT(pVM); 1311 1312 int rc; 1313 if (*pszPrefix == '/') 1314 rc = STAMR3DeregisterByPrefix(pVM->pUVM, pszPrefix); 1315 else 1316 { 1317 char szQualifiedPrefix[1024]; 1318 ssize_t cch; 1319 if (pDevIns->pReg->cMaxInstances == 1) 1320 cch = RTStrPrintf2(szQualifiedPrefix, sizeof(szQualifiedPrefix), "/Devices/%s/%s", pDevIns->pReg->szName, pszPrefix); 1321 else 1322 cch = RTStrPrintf2(szQualifiedPrefix, sizeof(szQualifiedPrefix), "/Devices/%s#%u/%s", 1323 pDevIns->pReg->szName, pDevIns->iInstance, pszPrefix); 1324 AssertReturn(cch > 0, VERR_OUT_OF_RANGE); 1325 rc = STAMR3DeregisterByPrefix(pVM->pUVM, szQualifiedPrefix); 1326 } 1327 AssertRC(rc); 1328 return rc; 1300 1329 } 1301 1330 … … 4411 4440 pdmR3DevHlp_CpuGetGuestMicroarch, 4412 4441 pdmR3DevHlp_CpuGetGuestAddrWidths, 4413 0,4442 pdmR3DevHlp_STAMDeregisterByPrefix, 4414 4443 0, 4415 4444 0, … … 4759 4788 pdmR3DevHlp_CpuGetGuestMicroarch, 4760 4789 pdmR3DevHlp_CpuGetGuestAddrWidths, 4761 0,4790 pdmR3DevHlp_STAMDeregisterByPrefix, 4762 4791 0, 4763 4792 0, … … 5264 5293 pdmR3DevHlp_CpuGetGuestMicroarch, 5265 5294 pdmR3DevHlp_CpuGetGuestAddrWidths, 5266 0,5295 pdmR3DevHlp_STAMDeregisterByPrefix, 5267 5296 0, 5268 5297 0,
Note:
See TracChangeset
for help on using the changeset viewer.