Changeset 46443 in vbox for trunk/src/VBox/VMM/include/STAMInternal.h
- Timestamp:
- Jun 7, 2013 4:18:29 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86286
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/STAMInternal.h
r46438 r46443 24 24 #include <VBox/vmm/gvmm.h> 25 25 #include <VBox/vmm/gmm.h> 26 #include <iprt/list.h> 26 27 #include <iprt/semaphore.h> 27 28 … … 36 37 */ 37 38 39 /** Enables the lookup tree. 40 * This is an optimization for speeding up registration as well as query. */ 41 #define STAM_WITH_LOOKUP_TREE 42 43 44 /** Pointer to sample descriptor. */ 45 typedef struct STAMDESC *PSTAMDESC; 46 /** Pointer to a sample lookup node. */ 47 typedef struct STAMLOOKUP *PSTAMLOOKUP; 48 49 /** 50 * Sample lookup node. 51 */ 52 typedef struct STAMLOOKUP 53 { 54 /** The parent lookup record. This is NULL for the root node. */ 55 PSTAMLOOKUP pParent; 56 /** Array of children (using array for binary searching). */ 57 PSTAMLOOKUP *papChildren; 58 /** Pointer to the description node, if any. */ 59 PSTAMDESC pDesc; 60 /** Number of decentants with descriptors. (Use for freeing up sub-trees.) */ 61 uint32_t cDescsInTree; 62 /** The number of children. */ 63 uint16_t cChildren; 64 /** The index in the parent paChildren array. UINT16_MAX for the root node. */ 65 uint16_t iParent; 66 /** The path offset. */ 67 uint16_t off; 68 /** The size of the path component. */ 69 uint16_t cch; 70 /** The name (variable size). */ 71 char szName[1]; 72 } STAMLOOKUP; 73 74 38 75 /** 39 76 * Sample descriptor. … … 41 78 typedef struct STAMDESC 42 79 { 43 /** Pointer to the next sample. */ 44 struct STAMDESC *pNext; 80 /** Our entry in the big linear list. */ 81 RTLISTNODE ListEntry; 82 /** Pointer to our lookup node. */ 83 PSTAMLOOKUP pLookup; 45 84 /** Sample name. */ 46 85 const char *pszName; … … 88 127 const char *pszDesc; 89 128 } STAMDESC; 90 /** Pointer to sample descriptor. */91 typedef STAMDESC *PSTAMDESC;92 /** Pointer to const sample descriptor. */93 typedef const STAMDESC *PCSTAMDESC;94 129 95 130 … … 99 134 typedef struct STAMUSERPERVM 100 135 { 101 /** Pointer to the first sample. */ 102 R3PTRTYPE(PSTAMDESC) pHead; 103 /** Lookup hint (pPrev value). */ 104 R3PTRTYPE(PSTAMDESC) pHint; 105 /** RW Lock for the list. */ 136 /** List of samples. */ 137 RTLISTANCHOR List; 138 /** Root of the lookup tree. */ 139 PSTAMLOOKUP pRoot; 140 141 /** RW Lock for the list and tree. */ 106 142 RTSEMRW RWSem; 107 /** Alignment padding. */108 RTR3PTR Alignment;109 143 110 144 /** The copy of the GVMM statistics. */ … … 118 152 GMMSTATS GMMStats; 119 153 } STAMUSERPERVM; 154 #ifdef IN_RING3 120 155 AssertCompileMemberAlignment(STAMUSERPERVM, GMMStats, 8); 156 #endif 121 157 122 158 /** Pointer to the STAM data kept in the UVM. */
Note:
See TracChangeset
for help on using the changeset viewer.