Changeset 92387 in vbox
- Timestamp:
- Nov 12, 2021 12:38:14 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/VBox/vmm/stam.h (modified) (2 diffs)
-
src/VBox/VMM/VMMR3/STAM.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/stam.h
r90834 r92387 202 202 /** Count of bytes. */ 203 203 STAMUNIT_BYTES, 204 /** Count of bytes per call. */ 205 STAMUNIT_BYTES_PER_CALL, 204 206 /** Count of bytes. */ 205 207 STAMUNIT_PAGES, … … 1314 1316 VMMR3DECL(int) STAMR3Enum(PUVM pUVM, const char *pszPat, PFNSTAMR3ENUM pfnEnum, void *pvUser); 1315 1317 VMMR3DECL(const char *) STAMR3GetUnit(STAMUNIT enmUnit); 1318 VMMR3DECL(const char *) STAMR3GetUnit1(STAMUNIT enmUnit); 1319 VMMR3DECL(const char *) STAMR3GetUnit2(STAMUNIT enmUnit); 1316 1320 1317 1321 /** @} */ -
trunk/src/VBox/VMM/VMMR3/STAM.cpp
r85121 r92387 2462 2462 2463 2463 uint64_t u64 = pDesc->u.pProfile->cPeriods ? pDesc->u.pProfile->cPeriods : 1; 2464 pArgs->pfnPrintf(pArgs, "%-32s %8llu %s (%12llu ticks, %7llu times, max %9llu, min %7lld)\n", pDesc->pszName,2464 pArgs->pfnPrintf(pArgs, "%-32s %8llu %s (%12llu %s, %7llu %s, max %9llu, min %7lld)\n", pDesc->pszName, 2465 2465 pDesc->u.pProfile->cTicks / u64, STAMR3GetUnit(pDesc->enmUnit), 2466 pDesc->u.pProfile->cTicks, pDesc->u.pProfile->cPeriods, pDesc->u.pProfile->cTicksMax, pDesc->u.pProfile->cTicksMin); 2466 pDesc->u.pProfile->cTicks, STAMR3GetUnit1(pDesc->enmUnit), 2467 pDesc->u.pProfile->cPeriods, STAMR3GetUnit2(pDesc->enmUnit), 2468 pDesc->u.pProfile->cTicksMax, pDesc->u.pProfile->cTicksMin); 2467 2469 break; 2468 2470 } … … 3000 3002 case STAMUNIT_COUNT: return "count"; 3001 3003 case STAMUNIT_BYTES: return "bytes"; 3004 case STAMUNIT_BYTES_PER_CALL: return "bytes/call"; 3002 3005 case STAMUNIT_PAGES: return "pages"; 3003 3006 case STAMUNIT_ERRORS: return "errors"; … … 3021 3024 } 3022 3025 3026 3027 /** 3028 * For something per something-else unit, get the first something. 3029 * 3030 * @returns Pointer to read only unit string. 3031 * @param enmUnit The unit. 3032 */ 3033 VMMR3DECL(const char *) STAMR3GetUnit1(STAMUNIT enmUnit) 3034 { 3035 switch (enmUnit) 3036 { 3037 case STAMUNIT_NONE: return ""; 3038 case STAMUNIT_CALLS: return "calls"; 3039 case STAMUNIT_COUNT: return "count"; 3040 case STAMUNIT_BYTES: return "bytes"; 3041 case STAMUNIT_BYTES_PER_CALL: return "bytes"; 3042 case STAMUNIT_PAGES: return "pages"; 3043 case STAMUNIT_ERRORS: return "errors"; 3044 case STAMUNIT_OCCURENCES: return "times"; 3045 case STAMUNIT_TICKS: return "ticks"; 3046 case STAMUNIT_TICKS_PER_CALL: return "ticks"; 3047 case STAMUNIT_TICKS_PER_OCCURENCE: return "ticks"; 3048 case STAMUNIT_GOOD_BAD: return "good"; 3049 case STAMUNIT_MEGABYTES: return "megabytes"; 3050 case STAMUNIT_KILOBYTES: return "kilobytes"; 3051 case STAMUNIT_NS: return "ns"; 3052 case STAMUNIT_NS_PER_CALL: return "ns"; 3053 case STAMUNIT_NS_PER_OCCURENCE: return "ns"; 3054 case STAMUNIT_PCT: return "%"; 3055 case STAMUNIT_HZ: return "Hz"; 3056 3057 default: 3058 AssertMsgFailed(("Unknown unit %d\n", enmUnit)); 3059 return "(?unit?)"; 3060 } 3061 } 3062 3063 3064 /** 3065 * For something per something-else unit, get the something-else. 3066 * 3067 * @returns Pointer to read only unit string. 3068 * @param enmUnit The unit. 3069 */ 3070 VMMR3DECL(const char *) STAMR3GetUnit2(STAMUNIT enmUnit) 3071 { 3072 switch (enmUnit) 3073 { 3074 case STAMUNIT_TICKS_PER_CALL: return "calls"; 3075 case STAMUNIT_NS_PER_CALL: return "calls"; 3076 case STAMUNIT_BYTES_PER_CALL: return "calls"; 3077 case STAMUNIT_TICKS_PER_OCCURENCE: return "times"; 3078 case STAMUNIT_NS_PER_OCCURENCE: return "times"; 3079 case STAMUNIT_NONE: return "times"; 3080 case STAMUNIT_GOOD_BAD: return "bad"; 3081 default: 3082 AssertMsgFailed(("Wrong unit %d\n", enmUnit)); 3083 return "times"; 3084 } 3085 } 3086 3023 3087 #ifdef VBOX_WITH_DEBUGGER 3024 3088
Note:
See TracChangeset
for help on using the changeset viewer.

