Changeset 23488 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 1, 2009 3:38:06 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53113
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r23393 r23488 1570 1570 STAM_REL_REG(pVM, &pPGM->cMonitoredPages, STAMTYPE_U32, "/PGM/Page/cMonitoredPages", STAMUNIT_OCCURENCES, "The number of write monitored pages."); 1571 1571 STAM_REL_REG(pVM, &pPGM->cWrittenToPages, STAMTYPE_U32, "/PGM/Page/cWrittenToPages", STAMUNIT_OCCURENCES, "The number of previously write monitored pages that have been written to."); 1572 STAM_REL_REG(pVM, &pPGM->cWriteLockedPages, STAMTYPE_U32, "/PGM/Page/cWriteLockedPages", STAMUNIT_OCCURENCES, "The number of write(/read) locked pages."); 1573 STAM_REL_REG(pVM, &pPGM->cReadLockedPages, STAMTYPE_U32, "/PGM/Page/cReadLockedPages", STAMUNIT_OCCURENCES, "The number of read (only) locked pages."); 1572 1574 STAM_REL_REG(pVM, &pPGM->cHandyPages, STAMTYPE_U32, "/PGM/Page/cHandyPages", STAMUNIT_OCCURENCES, "The number of handy pages (not included in cAllPages)."); 1573 1575 STAM_REL_REG(pVM, &pPGM->cRelocations, STAMTYPE_COUNTER, "/PGM/cRelocations", STAMUNIT_OCCURENCES, "Number of hypervisor relocations."); -
trunk/src/VBox/VMM/PGMInternal.h
r23486 r23488 2704 2704 uint32_t cMonitoredPages; /**< The number of write monitored pages. */ 2705 2705 uint32_t cWrittenToPages; /**< The number of previously write monitored pages. */ 2706 uint32_t cWriteLockedPages; /**< The number of write locked pages. */ 2707 uint32_t cReadLockedPages; /**< The number of read locked pages. */ 2706 2708 2707 2709 /** The number of times we were forced to change the hypervisor region location. */ -
trunk/src/VBox/VMM/PGMPhys.cpp
r23478 r23488 456 456 unsigned cLocks = PGM_PAGE_GET_WRITE_LOCKS(pPage); 457 457 if (RT_LIKELY(cLocks < PGM_PAGE_MAX_LOCKS - 1)) 458 { 459 if (cLocks == 0) 460 pVM->pgm.s.cWriteLockedPages++; 458 461 PGM_PAGE_INC_WRITE_LOCKS(pPage); 462 } 459 463 else if (cLocks != PGM_PAGE_GET_WRITE_LOCKS(pPage)) 460 464 { … … 530 534 unsigned cLocks = PGM_PAGE_GET_READ_LOCKS(pPage); 531 535 if (RT_LIKELY(cLocks < PGM_PAGE_MAX_LOCKS - 1)) 536 { 537 if (cLocks == 0) 538 pVM->pgm.s.cReadLockedPages++; 532 539 PGM_PAGE_INC_READ_LOCKS(pPage); 540 } 533 541 else if (cLocks != PGM_PAGE_GET_READ_LOCKS(pPage)) 534 542 { -
trunk/src/VBox/VMM/PGMSavedState.cpp
r23456 r23488 1047 1047 * A RAM page. 1048 1048 */ 1049 /** @todo Check for page locks (write) since these indicates that someone might1050 * be changing the page without owning the PGM lock. This breaks assumptions1051 * elsewhere.1052 * (A quick fix is to mark the page written-to when releasing a write lock.) */1053 1049 switch (PGM_PAGE_GET_STATE(&pCur->aPages[iPage])) 1054 1050 { … … 1088 1084 case PGM_PAGE_STATE_WRITE_MONITORED: 1089 1085 Assert(paLSPages[iPage].fWriteMonitored); 1090 paLSPages[iPage].fWriteMonitoredJustNow = 0;1086 paLSPages[iPage].fWriteMonitoredJustNow = PGM_PAGE_GET_WRITE_LOCKS(&pCur->aPages[iPage]) > 0; 1091 1087 break; 1092 1088 -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r23471 r23488 1072 1072 unsigned cLocks = PGM_PAGE_GET_WRITE_LOCKS(pPage); 1073 1073 if (RT_LIKELY(cLocks < PGM_PAGE_MAX_LOCKS - 1)) 1074 { 1075 if (cLocks == 0) 1076 pVM->pgm.s.cWriteLockedPages++; 1074 1077 PGM_PAGE_INC_WRITE_LOCKS(pPage); 1078 } 1075 1079 else if (cLocks != PGM_PAGE_GET_WRITE_LOCKS(pPage)) 1076 1080 { … … 1170 1174 unsigned cLocks = PGM_PAGE_GET_READ_LOCKS(pPage); 1171 1175 if (RT_LIKELY(cLocks < PGM_PAGE_MAX_LOCKS - 1)) 1176 { 1177 if (cLocks == 0) 1178 pVM->pgm.s.cReadLockedPages++; 1172 1179 PGM_PAGE_INC_READ_LOCKS(pPage); 1180 } 1173 1181 else if (cLocks != PGM_PAGE_GET_READ_LOCKS(pPage)) 1174 1182 { … … 1293 1301 Assert(cLocks > 0); 1294 1302 if (RT_LIKELY(cLocks > 0 && cLocks < PGM_PAGE_MAX_LOCKS)) 1303 { 1304 if (cLocks == 1) 1305 { 1306 Assert(pVM->pgm.s.cWriteLockedPages > 0); 1307 pVM->pgm.s.cWriteLockedPages--; 1308 } 1295 1309 PGM_PAGE_DEC_WRITE_LOCKS(pPage); 1310 } 1296 1311 1297 1312 if (PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_WRITE_MONITORED) … … 1309 1324 Assert(cLocks > 0); 1310 1325 if (RT_LIKELY(cLocks > 0 && cLocks < PGM_PAGE_MAX_LOCKS)) 1326 { 1327 if (cLocks == 1) 1328 { 1329 Assert(pVM->pgm.s.cReadLockedPages > 0); 1330 pVM->pgm.s.cReadLockedPages--; 1331 } 1311 1332 PGM_PAGE_DEC_READ_LOCKS(pPage); 1333 } 1312 1334 } 1313 1335
Note:
See TracChangeset
for help on using the changeset viewer.