Changeset 22924 in vbox
- Timestamp:
- Sep 10, 2009 10:00:36 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52189
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/IOMInternal.h
r22493 r22924 30 30 #include <VBox/pdmcritsect.h> 31 31 #include <VBox/param.h> 32 #include <iprt/assert.h> 32 33 #include <iprt/avl.h> 33 34 … … 130 131 STAMCOUNTER WriteRZToR3; 131 132 } IOMMMIOSTATS; 133 AssertCompileMemberAlignment(IOMMMIOSTATS, ReadR3, 8); 132 134 /** Pointer to I/O port statistics. */ 133 135 typedef IOMMMIOSTATS *PIOMMMIOSTATS; … … 241 243 /** Avl node core with the port as Key. */ 242 244 AVLOIOPORTNODECORE Core; 243 #if HC_ARCH_BITS == 64 &&!defined(RT_OS_WINDOWS)245 #if HC_ARCH_BITS != 64 || !defined(RT_OS_WINDOWS) 244 246 uint32_t u32Alignment; /**< The sizeof(Core) differs. */ 245 247 #endif … … 267 269 STAMCOUNTER OutRZToR3; 268 270 } IOMIOPORTSTATS; 271 AssertCompileMemberAlignment(IOMIOPORTSTATS, InR3, 8); 269 272 /** Pointer to I/O port statistics. */ 270 273 typedef IOMIOPORTSTATS *PIOMIOPORTSTATS; -
trunk/src/VBox/VMM/MMInternal.h
r20866 r22924 28 28 #include <VBox/stam.h> 29 29 #include <VBox/pdmcritsect.h> 30 #include <iprt/assert.h> 30 31 #include <iprt/avl.h> 31 32 #include <iprt/critsect.h> … … 67 68 struct MMHEAP *pHeap; 68 69 #ifdef MMR3HEAP_WITH_STATISTICS 70 # if HC_ARCH_BITS == 32 71 /** Aligning the statistics on an 8 byte boundrary (for uint64_t and STAM). */ 72 void *pvAlignment; 73 # endif 69 74 /** Number of allocation. */ 70 75 uint64_t cAllocations; … … 83 88 #endif 84 89 } MMHEAPSTAT; 90 #ifdef MMR3HEAP_WITH_STATISTICS 91 AssertCompileMemberAlignment(MMHEAPSTAT, cAllocations, 8); 92 #endif 85 93 /** Pointer to heap statistics record. */ 86 94 typedef MMHEAPSTAT *PMMHEAPSTAT; 95 87 96 88 97 … … 169 178 size_t cbCurAllocated; 170 179 } MMUKHEAPSTAT; 180 AssertCompileMemberAlignment(MMUKHEAPSTAT, cAllocations, 8); 171 181 /** Pointer to heap statistics record. */ 172 182 typedef MMUKHEAPSTAT *PMMUKHEAPSTAT; … … 203 213 /** The VM handle. */ 204 214 PUVM pUVM; 215 #if HC_ARCH_BITS == 32 216 /** Aligning the statistics on an 8 byte boundrary (for uint64_t and STAM). */ 217 void *pvAlignment; 218 #endif 205 219 /** Heap global statistics. */ 206 220 MMUKHEAPSTAT Stat; 207 221 } MMUKHEAP; 222 AssertCompileMemberAlignment(MMUKHEAP, Stat, 8); 208 223 /** Pointer to MM Heap structure. */ 209 224 typedef MMUKHEAP *PMMUKHEAP; … … 277 292 uint32_t cbMaxAllocated; 278 293 } MMHYPERSTAT; 294 AssertCompileMemberAlignment(MMHYPERSTAT, cAllocations, 8); 279 295 /** Pointer to hypervisor heap statistics record. */ 280 296 typedef MMHYPERSTAT *PMMHYPERSTAT; … … 536 552 /** Number of free pages in pool. */ 537 553 uint32_t cFreePages; 554 # if HC_ARCH_BITS == 32 555 /** Aligning the statistics on an 8 byte boundrary. */ 556 uint32_t u32Alignment; 557 # endif 538 558 /** Number of alloc calls. */ 539 559 STAMCOUNTER cAllocCalls; … … 548 568 #endif 549 569 } MMPAGEPOOL; 570 AssertCompileMemberAlignment(MMPAGEPOOL, cSubPools, 4); 571 #ifdef VBOX_WITH_STATISTICS 572 AssertCompileMemberAlignment(MMPAGEPOOL, cAllocCalls, 8); 573 #endif 550 574 /** Pointer to page pool. */ 551 575 typedef MMPAGEPOOL *PMMPAGEPOOL; -
trunk/src/VBox/VMM/PDMInternal.h
r21367 r22924 30 30 #include <VBox/vusb.h> 31 31 #include <VBox/pdmasynccompletion.h> 32 #include <iprt/assert.h> 32 33 #include <iprt/critsect.h> 33 34 #ifdef IN_RING3 … … 215 216 /** Pointer to the VM - GCPtr. */ 216 217 PVMRC pVMRC; 217 #if HC_ARCH_BITS == 64218 218 /** Alignment padding. */ 219 219 uint32_t padding; 220 #endif221 220 /** Event semaphore that is scheduled to be signaled upon leaving the 222 221 * critical section. This is Ring-3 only of course. */ … … 233 232 STAMPROFILEADV StatLocked; 234 233 } PDMCRITSECTINT; 234 AssertCompileMemberAlignment(PDMCRITSECTINT, StatContentionRZLock, 8); 235 /** Pointer to private critical section data. */ 235 236 typedef PDMCRITSECTINT *PPDMCRITSECTINT; 236 237 … … 912 913 /** Queue in which devhlp tasks are queued for R3 execution - RC Ptr. */ 913 914 RCPTRTYPE(PPDMQUEUE) pDevHlpQueueRC; 914 915 RTUINT uPadding1; /**< Alignment padding. */ 915 RTRCPTR uPadding1; /**< Alignment padding. */ 916 916 917 917 /** Linked list of timer driven PDM queues. */ … … 946 946 /** Pointer to the heap base (MMIO2 ring-3 mapping). NULL if not registered. */ 947 947 RTR3PTR pvVMMDevHeap; 948 #if HC_ARCH_BITS == 32 949 /** Alignment padding. */ 950 uint32_t u32Padding2; 951 #endif 948 952 /** The heap size. */ 949 953 RTUINT cbVMMDevHeap; … … 967 971 STAMCOUNTER StatQueuedCritSectLeaves; 968 972 } PDM; 973 AssertCompileMemberAlignment(PDM, GCPhysVMMDevHeap, sizeof(RTGCPHYS)); 974 AssertCompileMemberAlignment(PDM, CritSect, 8); 975 AssertCompileMemberAlignment(PDM, StatQueuedCritSectLeaves, 8); 969 976 /** Pointer to PDM VM instance data. */ 970 977 typedef PDM *PPDM; -
trunk/src/VBox/VMM/PGMInternal.h
r22919 r22924 37 37 #include <VBox/gmm.h> 38 38 #include <VBox/hwaccm.h> 39 #include <iprt/avl.h>40 39 #include <iprt/asm.h> 41 40 #include <iprt/assert.h> 41 #include <iprt/avl.h> 42 42 #include <iprt/critsect.h> 43 43 … … 1748 1748 /** Set if the cache is enabled. */ 1749 1749 bool fCacheEnabled; 1750 /** Alignment padding. */ 1751 bool afPadding1[3]; 1750 1752 #endif /* PGMPOOL_WITH_CACHE */ 1751 1753 #ifdef PGMPOOL_WITH_MONITORING … … 1760 1762 /** Access handler, R3. */ 1761 1763 R3PTRTYPE(PFNPGMR3PHYSHANDLER) pfnAccessHandlerR3; 1762 /** The access handler description ( HCptr). */1764 /** The access handler description (R3 ptr). */ 1763 1765 R3PTRTYPE(const char *) pszAccessHandler; 1766 # if HC_ARCH_BITS == 32 1767 /** Alignment padding. */ 1768 uint32_t u32Padding2; 1769 # endif 1764 1770 /* Next available slot. */ 1765 1771 uint32_t idxFreeDirtyPage; … … 1896 1902 PGMPOOLPAGE aPages[PGMPOOL_IDX_FIRST]; 1897 1903 } PGMPOOL, *PPGMPOOL, **PPPGMPOOL; 1904 #ifdef PGMPOOL_WITH_MONITORING 1905 AssertCompileMemberAlignment(PGMPOOL, iModifiedHead, 8); 1906 AssertCompileMemberAlignment(PGMPOOL, aDirtyPages, 8); 1907 #endif 1908 #ifdef VBOX_WITH_STATISTICS 1909 AssertCompileMemberAlignment(PGMPOOL, StatAlloc, 8); 1910 #endif 1911 AssertCompileMemberAlignment(PGMPOOL, aPages, 8); 1898 1912 1899 1913 … … 2267 2281 bool fRamPreAlloc; 2268 2282 /** Alignment padding. */ 2269 bool afAlignment0[ 11];2283 bool afAlignment0[7]; 2270 2284 2271 2285 /* … … 2337 2351 RTGCPTR GCPtrCR3Mapping; 2338 2352 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32 2339 uint32_t u32Alignment ;2353 uint32_t u32Alignment1; 2340 2354 #endif 2341 2355 … … 2394 2408 /** The address of the ring-0 mapping cache if we're making use of it. */ 2395 2409 RTR0PTR pvR0DynMapUsed; 2410 #if HC_ARCH_BITS == 32 2411 /** Alignment padding that makes the next member start on a 8 byte boundrary. */ 2412 uint32_t u32Alignment2; 2413 #endif 2396 2414 2397 2415 /** PGM critical section. … … 2415 2433 * (Only used in strict builds.) */ 2416 2434 bool fNoMorePhysWrites; 2435 /** Alignment padding that makes the next member start on a 8 byte boundrary. */ 2436 bool afAlignment3[HC_ARCH_BITS == 32 ? 7: 3]; 2417 2437 2418 2438 /** … … 2427 2447 R3R0PTRTYPE(PAVLU32NODECORE) pTree; 2428 2448 #endif 2449 /** The chunk age tree, ordered by ageing sequence number. */ 2450 R3PTRTYPE(PAVLLU32NODECORE) pAgeTree; 2429 2451 /** The chunk mapping TLB. */ 2430 2452 PGMCHUNKR3MAPTLB Tlb; … … 2434 2456 * @cfgm PGM/MaxRing3Chunks */ 2435 2457 uint32_t cMax; 2436 /** The chunk age tree, ordered by ageing sequence number. */2437 R3PTRTYPE(PAVLLU32NODECORE) pAgeTree;2438 2458 /** The current time. */ 2439 2459 uint32_t iNow; … … 2566 2586 #endif 2567 2587 } PGM; 2588 AssertCompileMemberAlignment(PGM, paDynPageMap32BitPTEsGC, 8); 2589 AssertCompileMemberAlignment(PGM, HCPhysInterPD, 8); 2590 AssertCompileMemberAlignment(PGM, aHCPhysDynPageMapCache, 8); 2591 AssertCompileMemberAlignment(PGM, CritSect, 8); 2592 AssertCompileMemberAlignment(PGM, ChunkR3Map, 8); 2593 AssertCompileMemberAlignment(PGM, PhysTlbHC, 8); 2594 AssertCompileMemberAlignment(PGM, HCPhysZeroPg, 8); 2595 AssertCompileMemberAlignment(PGM, aHandyPages, 8); 2596 AssertCompileMemberAlignment(PGM, cRelocations, 8); 2568 2597 /** Pointer to the PGM instance data. */ 2569 2598 typedef PGM *PPGM; -
trunk/src/VBox/VMM/STAM.cpp
r20864 r22924 597 597 Assert(stamR3SlashCompare(pCur->pszName, pszName) > 0); 598 598 599 #ifdef VBOX_STRICT 600 /* 601 * Check alignment requirements. 602 */ 603 switch (enmType) 604 { 605 /* 8 byte / 64-bit */ 606 case STAMTYPE_U64: 607 case STAMTYPE_U64_RESET: 608 case STAMTYPE_X64: 609 case STAMTYPE_X64_RESET: 610 case STAMTYPE_COUNTER: 611 case STAMTYPE_PROFILE: 612 case STAMTYPE_PROFILE_ADV: 613 AssertMsg(!((uintptr_t)pvSample & 7), ("%p - %s\n", pvSample, pszName)); 614 break; 615 616 /* 4 byte / 32-bit */ 617 case STAMTYPE_RATIO_U32: 618 case STAMTYPE_RATIO_U32_RESET: 619 case STAMTYPE_U32: 620 case STAMTYPE_U32_RESET: 621 case STAMTYPE_X32: 622 case STAMTYPE_X32_RESET: 623 AssertMsg(!((uintptr_t)pvSample & 3), ("%p - %s\n", pvSample, pszName)); 624 break; 625 626 /* 2 byte / 32-bit */ 627 case STAMTYPE_U16: 628 case STAMTYPE_U16_RESET: 629 case STAMTYPE_X16: 630 case STAMTYPE_X16_RESET: 631 AssertMsg(!((uintptr_t)pvSample & 1), ("%p - %s\n", pvSample, pszName)); 632 break; 633 634 /* 1 byte / 8-bit / unaligned */ 635 case STAMTYPE_U8: 636 case STAMTYPE_U8_RESET: 637 case STAMTYPE_X8: 638 case STAMTYPE_X8_RESET: 639 case STAMTYPE_CALLBACK: 640 break; 641 642 default: 643 AssertMsgFailed(("%d\n", enmType)); 644 break; 645 } 646 #endif /* VBOX_STRICT */ 647 599 648 /* 600 649 * Create a new node and insert it at the current location. -
trunk/src/VBox/VMM/VMInternal.h
r22915 r22924 25 25 #include <VBox/cdefs.h> 26 26 #include <VBox/vmapi.h> 27 #include <iprt/assert.h> 27 28 #include <setjmp.h> 28 29 … … 361 362 * If clear the VMR3Destroy() caller does so. */ 362 363 bool fEMTDoesTheCleanup; 364 /** Align the next bit. */ 365 bool afAlignment[5]; 363 366 364 367 /** @name Generic Halt data … … 393 396 /** How many times we've blocked while cBlockedNS and cBlockedTooLongNS has been accumulating. */ 394 397 uint32_t cBlocks; 398 /** Align the next member. */ 399 uint32_t u32Alignment; 395 400 /** Avg. time spend oversleeping when blocking. (Re-calculated every so often.) */ 396 401 uint64_t cNSBlockedTooLongAvg; … … 450 455 /** @} */ 451 456 } VMINTUSERPERVMCPU; 457 AssertCompileMemberAlignment(VMINTUSERPERVMCPU, u64HaltsStartTS, 8); 458 AssertCompileMemberAlignment(VMINTUSERPERVMCPU, Halt.Method12.cNSBlockedTooLongAvg, 8); 459 AssertCompileMemberAlignment(VMINTUSERPERVMCPU, StatHaltYield, 8); 452 460 453 461 /** Pointer to the VM internal data kept in the UVM. */
Note:
See TracChangeset
for help on using the changeset viewer.