VirtualBox

Changeset 100803 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Aug 4, 2023 10:04:07 PM (18 months ago)
Author:
vboxsync
Message:

VMM/IEM: More stats. bugref:10369

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdFuncsBltIn.cpp

    r100802 r100803  
    9191
    9292/**
    93  * Built-in function that checks for pending interrupts that can be delivered.
     93 * Built-in function that checks for pending interrupts that can be delivered or
     94 * forced action flags.
    9495 *
    9596 * This triggers after the completion of an instruction, so EIP is already at
     
    120121         pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.eip, fCpu,
    121122         pVCpu->CTX_SUFF(pVM)->fGlobalForcedActions & VM_FF_ALL_MASK, pVCpu->cpum.GstCtx.rflags.Bits.u1IF));
     123    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckIrqBreaks);
    122124    return VINF_IEM_REEXEC_BREAK;
    123125}
     
    139141             fExpectedExec, pVCpu->iem.s.fExec, fExpectedExec ^ pVCpu->iem.s.fExec));
    140142    RT_NOREF(uParam1, uParam2);
     143    STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckModeBreaks);
    141144    return VINF_IEM_REEXEC_BREAK;
    142145}
     
    245248                      pVCpu->iem.s.GCPhysInstrBuf + off, GCPhysRangePageWithOffset, pVCpu->iem.s.pbInstrBuf, __LINE__)); \
    246249                RT_NOREF(a_cbInstr); \
     250                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckBranchMisses); \
    247251                return VINF_IEM_REEXEC_BREAK; \
    248252            } \
     
    278282                      pVCpu->iem.s.GCPhysInstrBuf + offNew, GCPhysRangePageWithOffset, pVCpu->iem.s.pbInstrBuf, __LINE__)); \
    279283                RT_NOREF(a_cbInstr); \
     284                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckBranchMisses); \
    280285                return VINF_IEM_REEXEC_BREAK; \
    281286            } \
     
    311316                  pVCpu->iem.s.GCPhysInstrBuf + off, GCPhysRangePageWithOffset, pVCpu->iem.s.pbInstrBuf, __LINE__)); \
    312317            RT_NOREF(a_cbInstr); \
     318            STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckBranchMisses); \
    313319            return VINF_IEM_REEXEC_BREAK; \
    314320        } \
     
    331337                  pVCpu->cpum.GstCtx.cs.u32Limit, pVCpu->cpum.GstCtx.cs.u64Base, __LINE__)); \
    332338            RT_NOREF(a_pTb, a_cbInstr); \
     339            STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckNeedCsLimChecking); \
    333340            return VINF_IEM_REEXEC_BREAK; \
    334341        } \
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdRecompiler.cpp

    r100801 r100803  
    910910
    911911    PIEMTHRDEDCALLENTRY const pCall     = &pTb->Thrd.paCalls[pTb->Thrd.cCalls];
     912    pCall->idxInstr    = pTb->cInstructions;
    912913    pCall->offOpcode   = offOpcode;
    913914    pCall->idxRange    = idxRange;
     
    12721273        pTb->Thrd.cCalls = (uint16_t)(idxCall + 1);
    12731274        pCall->enmFunction = kIemThreadedFunc_BltIn_CheckIrq;
     1275        pCall->idxInstr    = pTb->cInstructions;
    12741276        pCall->uUnused0    = 0;
    12751277        pCall->offOpcode   = 0;
     
    13251327    PIEMTHRDEDCALLENTRY pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++];
    13261328    pCall->enmFunction = kIemThreadedFunc_BltIn_CheckIrq;
     1329    pCall->idxInstr    = pTb->cInstructions;
    13271330    pCall->uUnused0    = 0;
    13281331    pCall->offOpcode   = 0;
     
    14971500            iemThreadedLogCurInstr(pVCpu, "EX");
    14981501        }
    1499         Log9(("%04x:%08RX64: #%d - %d %s\n", pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip,
    1500               pTb->Thrd.cCalls - cCallsLeft - 1, pCallEntry->enmFunction, g_apszIemThreadedFunctions[pCallEntry->enmFunction]));
     1502        Log9(("%04x:%08RX64: #%d/%d - %d %s\n", pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip,
     1503              pTb->Thrd.cCalls - cCallsLeft - 1, pCallEntry->idxInstr, pCallEntry->enmFunction,
     1504              g_apszIemThreadedFunctions[pCallEntry->enmFunction]));
    15011505#endif
    15021506        VBOXSTRICTRC const rcStrict = g_apfnIemThreadedFunctions[pCallEntry->enmFunction](pVCpu,
     
    15091513        else
    15101514        {
    1511             pVCpu->iem.s.pCurTbR3 = NULL;
     1515            pVCpu->iem.s.cInstructions += pCallEntry->idxInstr; /* This may be one short, but better than zero. */
     1516            pVCpu->iem.s.pCurTbR3       = NULL;
     1517            STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatTbExecBreaks);
    15121518
    15131519            /* Some status codes are just to get us out of this loop and
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables.h

    r100788 r100803  
    207207            return VINF_IEM_RECOMPILE_END_TB; \
    208208        \
     209        uint8_t const idxInstrMc2 = pTb->cInstructions; \
    209210        do { } while (0)
    210211#define IEM_MC2_EMIT_CALL_0(a_enmFunction) do { \
     
    213214        PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \
    214215        pCall->enmFunction = a_enmFunction; \
     216        pCall->idxInstr    = idxInstrMc2; \
     217        pCall->uUnused0    = 0; \
    215218        pCall->offOpcode   = offOpcodeMc2; \
    216219        pCall->cbOpcode    = cbInstrMc2; \
     
    226229        PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \
    227230        pCall->enmFunction = a_enmFunction; \
     231        pCall->idxInstr    = idxInstrMc2; \
     232        pCall->uUnused0    = 0; \
    228233        pCall->offOpcode   = offOpcodeMc2; \
    229234        pCall->cbOpcode    = cbInstrMc2; \
     
    240245        PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \
    241246        pCall->enmFunction = a_enmFunction; \
     247        pCall->idxInstr    = idxInstrMc2; \
     248        pCall->uUnused0    = 0; \
    242249        pCall->offOpcode   = offOpcodeMc2; \
    243250        pCall->cbOpcode    = cbInstrMc2; \
     
    255262        PIEMTHRDEDCALLENTRY const pCall = &pTb->Thrd.paCalls[pTb->Thrd.cCalls++]; \
    256263        pCall->enmFunction = a_enmFunction; \
     264        pCall->idxInstr    = idxInstrMc2; \
     265        pCall->uUnused0    = 0; \
    257266        pCall->offOpcode   = offOpcodeMc2; \
    258267        pCall->cbOpcode    = cbInstrMc2; \
Note: See TracChangeset for help on using the changeset viewer.

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