Changeset 706 in vbox for trunk/src/VBox
- Timestamp:
- Feb 6, 2007 2:05:06 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/IOM.cpp
r23 r706 351 351 AssertRC(rc); 352 352 353 /* Profiling */ 354 RTStrPrintf(szName, sizeof(szName), "/IOM/Ports/%04x-In-R3/Prof", Port); 355 rc = STAMR3Register(pVM, &pPort->InR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 356 AssertRC(rc); 357 358 RTStrPrintf(szName, sizeof(szName), "/IOM/Ports/%04x-Out-R3/Prof", Port); 359 rc = STAMR3Register(pVM, &pPort->OutR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 360 AssertRC(rc); 361 362 RTStrPrintf(szName, sizeof(szName), "/IOM/Ports/%04x-In-GC/Prof", Port); 363 rc = STAMR3Register(pVM, &pPort->InGC, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 364 AssertRC(rc); 365 366 RTStrPrintf(szName, sizeof(szName), "/IOM/Ports/%04x-Out-GC/Prof", Port); 367 rc = STAMR3Register(pVM, &pPort->OutGC, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 368 AssertRC(rc); 369 370 RTStrPrintf(szName, sizeof(szName), "/IOM/Ports/%04x-In-R0/Prof", Port); 371 rc = STAMR3Register(pVM, &pPort->InR0, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 372 AssertRC(rc); 373 374 RTStrPrintf(szName, sizeof(szName), "/IOM/Ports/%04x-Out-R0/Prof", Port); 375 rc = STAMR3Register(pVM, &pPort->OutR0, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 376 AssertRC(rc); 377 353 378 return pPort; 354 379 } … … 425 450 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Write-R0-2-R3", GCPhys); 426 451 rc = STAMR3Register(pVM, &pStats->WriteR0ToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, szName, STAMUNIT_OCCURENCES, pszDesc); 452 AssertRC(rc); 453 454 /* Profiling */ 455 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Read-R3/Prof", GCPhys); 456 rc = STAMR3Register(pVM, &pStats->ReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 457 AssertRC(rc); 458 459 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Write-R3/Prof", GCPhys); 460 rc = STAMR3Register(pVM, &pStats->WriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 461 AssertRC(rc); 462 463 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Read-GC/Prof", GCPhys); 464 rc = STAMR3Register(pVM, &pStats->ReadGC, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 465 AssertRC(rc); 466 467 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Write-GC/Prof", GCPhys); 468 rc = STAMR3Register(pVM, &pStats->WriteGC, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 469 AssertRC(rc); 470 471 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Read-R0/Prof", GCPhys); 472 rc = STAMR3Register(pVM, &pStats->ReadR0, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 473 AssertRC(rc); 474 475 RTStrPrintf(szName, sizeof(szName), "/IOM/MMIO/%RGp-Write-R0/Prof", GCPhys); 476 rc = STAMR3Register(pVM, &pStats->WriteR0, STAMTYPE_PROFILE, STAMVISIBILITY_USED, szName, STAMUNIT_TICKS_PER_CALL, pszDesc); 427 477 AssertRC(rc); 428 478 -
trunk/src/VBox/VMM/IOMInternal.h
r23 r706 122 122 /** Number of writes to this address from GC. */ 123 123 STAMCOUNTER WriteGC; 124 /** Profiling read handler overhead in R3. */ 125 STAMPROFILEADV ProfReadR3; 126 /** Profiling write handler overhead in R3. */ 127 STAMPROFILEADV ProfWriteR3; 128 /** Profiling read handler overhead in R0. */ 129 STAMPROFILEADV ProfReadR0; 130 /** Profiling write handler overhead in R0. */ 131 STAMPROFILEADV ProfWriteR0; 132 /** Profiling read handler overhead in GC. */ 133 STAMPROFILEADV ProfReadGC; 134 /** Profiling write handler overhead in GC. */ 135 STAMPROFILEADV ProfWriteGC; 124 136 /** Number of reads to this address from R0 which was serviced in R3. */ 125 137 STAMCOUNTER ReadR0ToR3; … … 221 233 /** Number of OUTs to this port from GC. */ 222 234 STAMCOUNTER OutGC; 235 /** Profiling IN handler overhead in R3. */ 236 STAMPROFILEADV ProfInR3; 237 /** Profiling OUT handler overhead in R3. */ 238 STAMPROFILEADV ProfOutR3; 239 /** Profiling IN handler overhead in R0. */ 240 STAMPROFILEADV ProfInR0; 241 /** Profiling OUT handler overhead in R0. */ 242 STAMPROFILEADV ProfOutR0; 243 /** Profiling IN handler overhead in GC. */ 244 STAMPROFILEADV ProfInGC; 245 /** Profiling OUT handler overhead in GC. */ 246 STAMPROFILEADV ProfOutGC; 223 247 /** Number of INs to this port from R0 which was serviced in R3. */ 224 248 STAMCOUNTER InR0ToR3; -
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r23 r706 567 567 #endif 568 568 /* call the device. */ 569 #ifdef VBOX_WITH_STATISTICS 570 if (pStats) 571 STAM_PROFILE_ADV_START(&pStats->CTXALLSUFF(ProfIn), a); 572 #endif 569 573 int rc = pRange->pfnInCallback(pRange->pDevIns, pRange->pvUser, Port, pu32Value, cbValue); 570 574 #ifdef VBOX_WITH_STATISTICS 575 if (pStats) 576 STAM_PROFILE_ADV_STOP(&pStats->CTXALLSUFF(ProfIn), a); 571 577 if (rc == VINF_SUCCESS && pStats) 572 578 STAM_COUNTER_INC(&pStats->CTXALLSUFF(In)); … … 701 707 #endif 702 708 /* call the device. */ 709 #ifdef VBOX_WITH_STATISTICS 710 if (pStats) 711 STAM_PROFILE_ADV_START(&pStats->CTXALLSUFF(ProfIn), a); 712 #endif 713 703 714 int rc = pRange->pfnInStrCallback(pRange->pDevIns, pRange->pvUser, Port, pGCPtrDst, pcTransfers, cb); 704 715 #ifdef VBOX_WITH_STATISTICS 716 if (pStats) 717 STAM_PROFILE_ADV_STOP(&pStats->CTXALLSUFF(ProfIn), a); 705 718 if (rc == VINF_SUCCESS && pStats) 706 719 STAM_COUNTER_INC(&pStats->CTXALLSUFF(In)); … … 812 825 #endif 813 826 /* call the device. */ 827 #ifdef VBOX_WITH_STATISTICS 828 if (pStats) 829 STAM_PROFILE_ADV_START(&pStats->CTXALLSUFF(ProfOut), a); 830 #endif 814 831 int rc = pRange->pfnOutCallback(pRange->pDevIns, pRange->pvUser, Port, u32Value, cbValue); 815 832 816 833 #ifdef VBOX_WITH_STATISTICS 834 if (pStats) 835 STAM_PROFILE_ADV_STOP(&pStats->CTXALLSUFF(ProfOut), a); 817 836 if (rc == VINF_SUCCESS && pStats) 818 837 STAM_COUNTER_INC(&pStats->CTXALLSUFF(Out)); … … 923 942 #endif 924 943 /* call the device. */ 944 #ifdef VBOX_WITH_STATISTICS 945 if (pStats) 946 STAM_PROFILE_ADV_START(&pStats->CTXALLSUFF(ProfOut), a); 947 #endif 925 948 int rc = pRange->pfnOutStrCallback(pRange->pDevIns, pRange->pvUser, Port, pGCPtrSrc, pcTransfers, cb); 926 949 #ifdef VBOX_WITH_STATISTICS 950 if (pStats) 951 STAM_PROFILE_ADV_STOP(&pStats->CTXALLSUFF(ProfOut), a); 927 952 if (rc == VINF_SUCCESS && pStats) 928 953 STAM_COUNTER_INC(&pStats->CTXALLSUFF(Out));
Note:
See TracChangeset
for help on using the changeset viewer.