VirtualBox

Changeset 15218 in vbox


Ignore:
Timestamp:
Dec 10, 2008 12:23:49 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40632
Message:

HWACCM: some temporary profiling of sub-parts of SwitchFromGC_2.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/HWACCM.cpp

    r15217 r15218  
    244244                             "/PROF/HWACCM/CPU%d/SwitchFromGC_2", i);
    245245        AssertRC(rc);
     246# if 1 /* temporary for tracking down darwin holdup. */
     247        rc = STAMR3RegisterF(pVM, &pVCpu->hwaccm.s.StatExit2Sub1, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, "Temporary - I/O",
     248                             "/PROF/HWACCM/CPU%d/SwitchFromGC_2/Sub1", i);
     249        AssertRC(rc);
     250        rc = STAMR3RegisterF(pVM, &pVCpu->hwaccm.s.StatExit2Sub2, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, "Temporary - CRx RWs",
     251                             "/PROF/HWACCM/CPU%d/SwitchFromGC_2/Sub2", i);
     252        AssertRC(rc);
     253        rc = STAMR3RegisterF(pVM, &pVCpu->hwaccm.s.StatExit2Sub3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, "Temporary - Exceptions",
     254                             "/PROF/HWACCM/CPU%d/SwitchFromGC_2/Sub3", i);
     255        AssertRC(rc);
     256# endif
    246257        rc = STAMR3RegisterF(pVM, &pVCpu->hwaccm.s.StatInGC, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, "Profiling of vmlaunch",
    247258                             "/PROF/HWACCM/CPU%d/InGC", i);
    248259        AssertRC(rc);
    249260
    250 #define HWACCM_REG_COUNTER(a, b) \
     261# define HWACCM_REG_COUNTER(a, b) \
    251262        rc = STAMR3RegisterF(pVM, a, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Profiling of vmlaunch", b, i); \
    252263        AssertRC(rc);
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r15197 r15218  
    481481    STAMPROFILEADV          StatExit1;
    482482    STAMPROFILEADV          StatExit2;
     483#if 1 /* temporary for tracking down darwin issues. */
     484    STAMPROFILEADV          StatExit2Sub1;
     485    STAMPROFILEADV          StatExit2Sub2;
     486    STAMPROFILEADV          StatExit2Sub3;
     487#endif
    483488    STAMPROFILEADV          StatInGC;
    484489
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r15211 r15218  
    21592159            break;
    21602160        }
     2161        STAM_PROFILE_ADV_START(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    21612162        switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo))
    21622163        {
     
    21942195                    pVCpu->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_CR0;
    21952196
     2197                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    21962198                    goto ResumeExecution;
    21972199                }
     
    22012203                rc = VMXR0InjectEvent(pVM, pVCpu, pCtx, VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(intInfo), cbInstr, 0);
    22022204                AssertRC(rc);
     2205                STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    22032206                goto ResumeExecution;
    22042207            }
     
    22222225                    AssertRC(rc);
    22232226
     2227                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    22242228                    goto ResumeExecution;
    22252229                }
     
    22432247                    TRPMResetTrap(pVM);
    22442248
     2249                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    22452250                    goto ResumeExecution;
    22462251                }
     
    22632268                    AssertRC(rc);
    22642269
     2270                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    22652271                    goto ResumeExecution;
    22662272                }
     
    22882294                AssertRC(rc);
    22892295
     2296                STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    22902297                goto ResumeExecution;
    22912298            }
     
    23352342                    AssertRC(rc);
    23362343
     2344                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    23372345                    goto ResumeExecution;
    23382346                }
     
    23522360                    rc = VMXR0InjectEvent(pVM, pVCpu, pCtx, VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(intInfo), cbInstr, errCode);
    23532361                    AssertRC(rc);
     2362                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    23542363                    goto ResumeExecution;
    23552364                }
     
    23672376
    23682377                    /* Only resume if successful. */
     2378                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    23692379                    goto ResumeExecution;
    23702380                }
     
    23992409                AssertRC(rc);
    24002410
     2411                STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    24012412                goto ResumeExecution;
    24022413            }
     
    24152426                        break;
    24162427
     2428                    STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    24172429                    goto ResumeExecution;
    24182430                }
     
    24312443        }
    24322444
     2445        STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub3, y3);
    24332446        break;
    24342447    }
     
    25872600    case VMX_EXIT_CRX_MOVE:             /* 28 Control-register accesses. */
    25882601    {
     2602        STAM_PROFILE_ADV_START(&pVCpu->hwaccm.s.StatExit2Sub2, y2);
     2603
    25892604        switch (VMX_EXIT_QUALIFICATION_CRX_ACCESS(exitQualification))
    25902605        {
     
    26642679        {
    26652680            /* Only resume if successful. */
     2681            STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub2, y2);
    26662682            goto ResumeExecution;
    26672683        }
    26682684        Assert(rc == VERR_EM_INTERPRETER || rc == VINF_PGM_CHANGE_MODE || rc == VINF_PGM_SYNC_CR3);
     2685        STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub2, y2);
    26692686        break;
    26702687    }
     
    27292746    case VMX_EXIT_PORT_IO:              /* 30 I/O instruction. */
    27302747    {
     2748        STAM_PROFILE_ADV_START(&pVCpu->hwaccm.s.StatExit2Sub1, y1);
    27312749        uint32_t uIOWidth = VMX_EXIT_QUALIFICATION_IO_WIDTH(exitQualification);
    27322750        uint32_t uPort;
     
    27452763        {
    27462764            rc = fIOWrite ? VINF_IOM_HC_IOPORT_WRITE : VINF_IOM_HC_IOPORT_READ;
     2765            STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub1, y1);
    27472766            break;
    27482767        }
     
    28612880                            AssertRC(rc);
    28622881
     2882                            STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub1, y1);
    28632883                            goto ResumeExecution;
    28642884                        }
     
    28662886                }
    28672887
     2888                STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub1, y1);
    28682889                goto ResumeExecution;
    28692890            }
     2891            STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub1, y1);
    28702892            break;
    28712893        }
     
    28792901            AssertMsg(RT_FAILURE(rc) || rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED, ("%Rrc\n", rc));
    28802902#endif
     2903        STAM_PROFILE_ADV_STOP(&pVCpu->hwaccm.s.StatExit2Sub1, y1);
    28812904        break;
    28822905    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette