VirtualBox

Changeset 104407 in vbox


Ignore:
Timestamp:
Apr 23, 2024 11:16:04 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162902
Message:

VMM/IEM: Adjusted the TB exit statistics a bit more, adding a few new one, making more of the release stats that doesn't go into the TB, and organizing them to try avoid counting the same exit more than once. bugref:10376 bugref:10653

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r104099 r104407  
    25072507/** Recompiled execution: Break out of current TB execution. */
    25082508#define VINF_IEM_REEXEC_BREAK                       (5310)
     2509/** Recompiled execution: Breaking out because of FFs or/and IRQs. */
     2510#define VINF_IEM_REEXEC_BREAK_FF                    (5311)
    25092511/** Recompiled execution: Debug related (hidden) EFLAGS are set and needs
    25102512 *  handling. */
    2511 #define VINF_IEM_REEXEC_FINISH_WITH_FLAGS           (5311)
     2513#define VINF_IEM_REEXEC_FINISH_WITH_FLAGS           (5312)
    25122514
    25132515/** Recompilation: End translation block. */
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompBltIn.cpp

    r104030 r104407  
    215215                                                          UINT32_MAX, pReNative->uCheckIrqSeqNo++);
    216216
    217     uint32_t const idxLabelReturnBreak = iemNativeLabelCreate(pReNative, kIemNativeLabelType_ReturnBreak);
     217    uint32_t const idxLabelReturnBreakFF = iemNativeLabelCreate(pReNative, kIemNativeLabelType_ReturnBreakFF);
    218218
    219219    /* Again, we need to load the extended EFLAGS before we actually need them
     
    250250                                   ~(VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC), true /*fSetFlags*/);
    251251    /* Return VINF_IEM_REEXEC_BREAK if other FFs are set. */
    252     off = iemNativeEmitJnzToLabel(pReNative, off, idxLabelReturnBreak);
     252    off = iemNativeEmitJnzToLabel(pReNative, off, idxLabelReturnBreakFF);
    253253
    254254    /* So, it's only interrupt releated FFs and we need to see if IRQs are being
     
    256256    off = iemNativeEmitTestBitInGprAndJmpToLabelIfNotSet(pReNative, off, idxEflReg, X86_EFL_IF_BIT, idxLabelVmCheck);
    257257    off = iemNativeEmitTestAnyBitsInGprAndJmpToLabelIfNoneSet(pReNative, off, idxEflReg, CPUMCTX_INHIBIT_SHADOW,
    258                                                               idxLabelReturnBreak);
     258                                                              idxLabelReturnBreakFF);
    259259
    260260    /* We've got shadow flags set, so we must check that the PC they are valid
     
    263263     *        a register. */
    264264    off = iemNativeEmitLoadGprFromVCpuU64(pReNative, off, idxTmpReg, RT_UOFFSETOF(VMCPUCC, cpum.GstCtx.uRipInhibitInt));
    265     off = iemNativeEmitTestIfGprNotEqualGprAndJmpToLabel(pReNative, off, idxTmpReg, idxPcReg, idxLabelReturnBreak);
     265    off = iemNativeEmitTestIfGprNotEqualGprAndJmpToLabel(pReNative, off, idxTmpReg, idxPcReg, idxLabelReturnBreakFF);
    266266
    267267    /*
     
    273273    off = iemNativeEmitLoadGprByGprU32(pReNative, off, idxTmpReg, idxTmpReg, RT_UOFFSETOF(VMCC, fGlobalForcedActions));
    274274    off = iemNativeEmitAndGpr32ByImm(pReNative, off, idxTmpReg, VM_FF_ALL_MASK, true /*fSetFlags*/);
    275     off = iemNativeEmitJnzToLabel(pReNative, off, idxLabelReturnBreak);
     275    off = iemNativeEmitJnzToLabel(pReNative, off, idxLabelReturnBreakFF);
    276276
    277277    /** @todo STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatCheckIrqBreaks); */
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r104361 r104407  
    18271827    pReNative->Core.u64ArgVars             = UINT64_MAX;
    18281828
    1829     AssertCompile(RT_ELEMENTS(pReNative->aidxUniqueLabels) == 17);
     1829    AssertCompile(RT_ELEMENTS(pReNative->aidxUniqueLabels) == 18);
    18301830    pReNative->aidxUniqueLabels[0]         = UINT32_MAX;
    18311831    pReNative->aidxUniqueLabels[1]         = UINT32_MAX;
     
    18451845    pReNative->aidxUniqueLabels[15]        = UINT32_MAX;
    18461846    pReNative->aidxUniqueLabels[16]        = UINT32_MAX;
     1847    pReNative->aidxUniqueLabels[17]        = UINT32_MAX;
    18471848
    18481849    /* Full host register reinit: */
     
    62266227
    62276228/**
    6228  * Emits the code at the ReturnWithFlags label (returns
    6229  * VINF_IEM_REEXEC_FINISH_WITH_FLAGS).
     6229 * Emits the code at the ReturnWithFlags label (returns VINF_IEM_REEXEC_FINISH_WITH_FLAGS).
    62306230 */
    62316231static uint32_t iemNativeEmitReturnWithFlags(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint32_t idxReturnLabel)
     
    62356235    {
    62366236        iemNativeLabelDefine(pReNative, idxLabel, off);
    6237 
    6238 #ifdef VBOX_WITH_STATISTICS
    6239         off = iemNativeEmitNativeTbExitStats(pReNative, off, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitReturnWithFlags));
    6240 #endif
    6241 
     6237        /* set the return status  */
    62426238        off = iemNativeEmitLoadGprImm64(pReNative, off, IEMNATIVE_CALL_RET_GREG, VINF_IEM_REEXEC_FINISH_WITH_FLAGS);
    6243 
    62446239        /* jump back to the return sequence. */
    62456240        off = iemNativeEmitJmpToLabel(pReNative, off, idxReturnLabel);
     
    62506245
    62516246/**
     6247 * Emits the code at the ReturnBreakFF label (returns VINF_IEM_REEXEC_BREAK_FF).
     6248 */
     6249static uint32_t iemNativeEmitReturnBreakFF(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint32_t idxReturnLabel)
     6250{
     6251    uint32_t const idxLabel = iemNativeLabelFind(pReNative, kIemNativeLabelType_ReturnBreakFF);
     6252    if (idxLabel != UINT32_MAX)
     6253    {
     6254        iemNativeLabelDefine(pReNative, idxLabel, off);
     6255        /* set the return status */
     6256        off = iemNativeEmitLoadGprImm64(pReNative, off, IEMNATIVE_CALL_RET_GREG, VINF_IEM_REEXEC_BREAK_FF);
     6257        /* jump back to the return sequence. */
     6258        off = iemNativeEmitJmpToLabel(pReNative, off, idxReturnLabel);
     6259    }
     6260    return off;
     6261}
     6262
     6263
     6264/**
    62526265 * Emits the code at the ReturnBreak label (returns VINF_IEM_REEXEC_BREAK).
    62536266 */
     
    62586271    {
    62596272        iemNativeLabelDefine(pReNative, idxLabel, off);
    6260 
    6261 #ifdef VBOX_WITH_STATISTICS
    6262         off = iemNativeEmitNativeTbExitStats(pReNative, off, RT_UOFFSETOF(VMCPUCC, iem.s.StatNativeTbExitReturnBreak));
    6263 #endif
    6264 
     6273        /* set the return status */
    62656274        off = iemNativeEmitLoadGprImm64(pReNative, off, IEMNATIVE_CALL_RET_GREG, VINF_IEM_REEXEC_BREAK);
    6266 
    62676275        /* jump back to the return sequence. */
    62686276        off = iemNativeEmitJmpToLabel(pReNative, off, idxReturnLabel);
     
    86458653                                case kIemNativeLabelType_Return:                pszName = "Return"; break;
    86468654                                case kIemNativeLabelType_ReturnBreak:           pszName = "ReturnBreak"; break;
     8655                                case kIemNativeLabelType_ReturnBreakFF:         pszName = "ReturnBreakFF"; break;
    86478656                                case kIemNativeLabelType_ReturnWithFlags:       pszName = "ReturnWithFlags"; break;
    86488657                                case kIemNativeLabelType_NonZeroRetOrPassUp:    pszName = "NonZeroRetOrPassUp"; break;
     
    92739282        if (pReNative->bmLabelTypes & RT_BIT_64(kIemNativeLabelType_ReturnBreak))
    92749283            off = iemNativeEmitReturnBreak(pReNative, off, idxReturnLabel);
     9284        if (pReNative->bmLabelTypes & RT_BIT_64(kIemNativeLabelType_ReturnBreakFF))
     9285            off = iemNativeEmitReturnBreakFF(pReNative, off, idxReturnLabel);
    92759286        if (pReNative->bmLabelTypes & RT_BIT_64(kIemNativeLabelType_ReturnWithFlags))
    92769287            off = iemNativeEmitReturnWithFlags(pReNative, off, idxReturnLabel);
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdRecompiler.cpp

    r104406 r104407  
    28732873            /* pVCpu->iem.s.cInstructions is incremented by iemNativeHlpExecStatusCodeFiddling. */
    28742874            pVCpu->iem.s.pCurTbR3 = NULL;
    2875             STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatTbExecBreaks);
    28762875
    28772876            /* VINF_IEM_REEXEC_BREAK should be treated as VINF_SUCCESS as it's
    28782877               only to break out of TB execution early. */
    28792878            if (rcStrict == VINF_IEM_REEXEC_BREAK)
     2879            {
     2880                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitReturnBreak);
    28802881                return iemExecStatusCodeFiddling(pVCpu, VINF_SUCCESS);
     2882            }
     2883
     2884            /* VINF_IEM_REEXEC_BREAK_FF should be treated as VINF_SUCCESS as it's
     2885               only to break out of TB execution early due to pending FFs. */
     2886            if (rcStrict == VINF_IEM_REEXEC_BREAK_FF)
     2887            {
     2888                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitReturnBreakFF);
     2889                return iemExecStatusCodeFiddling(pVCpu, VINF_SUCCESS);
     2890            }
    28812891
    28822892            /* VINF_IEM_REEXEC_WITH_FLAGS needs to receive special treatment
    28832893               and converted to VINF_SUCCESS or whatever is appropriate. */
    28842894            if (rcStrict == VINF_IEM_REEXEC_FINISH_WITH_FLAGS)
     2895            {
     2896                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitReturnWithFlags);
    28852897                return iemExecStatusCodeFiddling(pVCpu, iemFinishInstructionWithFlagsSet(pVCpu, VINF_SUCCESS));
    2886 
     2898            }
     2899
     2900            STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitReturnOtherStatus);
    28872901            return iemExecStatusCodeFiddling(pVCpu, rcStrict);
    28882902        }
     
    29272941                pVCpu->iem.s.cInstructions += pCallEntry->idxInstr; /* This may be one short, but better than zero. */
    29282942                pVCpu->iem.s.pCurTbR3       = NULL;
    2929                 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatTbExecBreaks);
     2943                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatTbThreadedExecBreaks);
    29302944                pVCpu->iem.s.ppTbLookupEntryR3 = iemTbGetTbLookupEntryWithRip(pTb, pCallEntry->uTbLookup, pVCpu->cpum.GstCtx.rip);
    29312945
     
    30863100    for (;;)
    30873101    {
    3088         PIEMTB       pTb = NULL;
    30893102        VBOXSTRICTRC rcStrict;
    30903103        IEM_TRY_SETJMP(pVCpu, rcStrict)
     
    30983111                {
    30993112                    uint32_t const fExtraFlags = iemGetTbFlagsForCurrentPc(pVCpu);
    3100                     pTb = iemTbCacheLookup(pVCpu, pTbCache, GCPhysPc, fExtraFlags);
     3113                    PIEMTB const   pTb        = iemTbCacheLookup(pVCpu, pTbCache, GCPhysPc, fExtraFlags);
    31013114                    if (pTb)
    31023115                        rcStrict = iemTbExec(pVCpu, pTb);
     
    31333146                        if (RT_LIKELY(   (iIterations & cPollRate) != 0
    31343147                                      || !TMTimerPollBoolWith32BitMilliTS(pVM, pVCpu, &pVCpu->iem.s.msRecompilerPollNow)))
    3135                             pTb = NULL; /* Clear it before looping so iemTbCacheLookup can safely do native recompilation. */
     3148                        { /* likely */ }
    31363149                        else
    31373150                            return VINF_SUCCESS;
     
    31533166                iemMemRollback(pVCpu);
    31543167
    3155 #ifdef IEMNATIVE_WITH_INSTRUCTION_COUNTING
     3168#ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER
     3169            PIEMTB const pTb = pVCpu->iem.s.pCurTbR3;
    31563170            if (pTb && (pTb->fFlags & IEMTB_F_TYPE_MASK) == IEMTB_F_TYPE_NATIVE)
    31573171            {
     3172                STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeTbExitLongJump);
     3173# ifdef IEMNATIVE_WITH_INSTRUCTION_COUNTING
    31583174                Assert(pVCpu->iem.s.idxTbCurInstr < pTb->cInstructions);
    31593175                pVCpu->iem.s.cInstructions += pVCpu->iem.s.idxTbCurInstr;
     3176# endif
    31603177            }
    31613178#endif
  • trunk/src/VBox/VMM/VMMR3/IEMR3.cpp

    r104362 r104407  
    383383        STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.cTbExecThreaded,     STAMTYPE_U64_RESET, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    384384                        "Executed threaded translation block",          "/IEM/CPU%u/re/cTbExecThreaded", idCpu);
    385         STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbExecBreaks,    STAMTYPE_COUNTER,   STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,
    386                         "Times TB execution was interrupted/broken off", "/IEM/CPU%u/re/cTbExecBreaks", idCpu);
     385        STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbThreadedExecBreaks, STAMTYPE_COUNTER,   STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,
     386                        "Times threaded TB execution was interrupted/broken off", "/IEM/CPU%u/re/cTbExecThreadedBreaks", idCpu);
    387387# ifdef VBOX_WITH_STATISTICS
    388388        STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbThreadedExecBreaksWithLookup, STAMTYPE_COUNTER,   STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,
    389                         "Times threaded TB execution was interrupted/broken off on a call with lookup entries", "/IEM/CPU%u/re/cTbExecBreaksWithLookup", idCpu);
     389                        "Times threaded TB execution was interrupted/broken off on a call with lookup entries", "/IEM/CPU%u/re/cTbExecThreadedBreaksWithLookup", idCpu);
    390390        STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatTbThreadedExecBreaksWithoutLookup, STAMTYPE_COUNTER,   STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,
    391                         "Times threaded TB execution was interrupted/broken off on a call without lookup entries", "/IEM/CPU%u/re/cTbExecBreaksWithoutLookup", idCpu);
     391                        "Times threaded TB execution was interrupted/broken off on a call without lookup entries", "/IEM/CPU%u/re/cTbExecThreadedBreaksWithoutLookup", idCpu);
    392392# endif
    393393
     
    617617
    618618        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbFinished, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    619                         "Number of times the TB finishes execution completely", "/IEM/CPU%u/re/NativeTbFinished", idCpu);
     619                        "Number of times the TB finishes execution completely",
     620                        "/IEM/CPU%u/re/NativeTbFinished", idCpu);
     621#  endif /* VBOX_WITH_STATISTICS */
    620622        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnBreak, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    621                         "Number of times the TB finished through the ReturnBreak label", "/IEM/CPU%u/re/NativeTbExitReturnBreak", idCpu);
     623                        "Number of times the TB finished through the ReturnBreak label",
     624                        "/IEM/CPU%u/re/NativeTbExit/ReturnBreak", idCpu);
     625        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnBreakFF, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
     626                        "Number of times the TB finished through the ReturnBreak label",
     627                        "/IEM/CPU%u/re/NativeTbExit/ReturnBreakFF", idCpu);
    622628        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnWithFlags, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    623                         "Number of times the TB finished through the ReturnWithFlags label", "/IEM/CPU%u/re/NativeTbExitReturnWithFlags", idCpu);
    624 #  endif /* VBOX_WITH_STATISTICS */
     629                        "Number of times the TB finished through the ReturnWithFlags label",
     630                        "/IEM/CPU%u/re/NativeTbExit/ReturnWithFlags", idCpu);
     631        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitReturnOtherStatus, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
     632                        "Number of times the TB finished with some other status value",
     633                        "/IEM/CPU%u/re/NativeTbExit/ReturnOtherStatus", idCpu);
     634        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitLongJump, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
     635                        "Number of times the TB finished via long jump / throw",
     636                        "/IEM/CPU%u/re/NativeTbExit/LongJumps", idCpu);
     637        /* These end up returning VINF_IEM_REEXEC_BREAK and are thus already counted under NativeTbExit/ReturnBreak: */
    625638        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitObsoleteTb, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    626                         "Number of times the TB finished through the ObsoleteTb label", "/IEM/CPU%u/re/NativeTbExitObsoleteTb", idCpu);
     639                        "Number of times the TB finished through the ObsoleteTb label",
     640                        "/IEM/CPU%u/re/NativeTbExit/ReturnBreak/ObsoleteTb", idCpu);
    627641        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatCheckNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    628                         "Number of times the TB finished through the NeedCsLimChecking label", "/IEM/CPU%u/re/NativeTbExitNeedCsLimChecking", idCpu);
     642                        "Number of times the TB finished through the NeedCsLimChecking label",
     643                        "/IEM/CPU%u/re/NativeTbExit/ReturnBreak/NeedCsLimChecking", idCpu);
    629644        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatCheckBranchMisses, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    630                         "Number of times the TB finished through the CheckBranchMiss label", "/IEM/CPU%u/re/NativeTbExitCheckBranchMiss", idCpu);
     645                        "Number of times the TB finished through the CheckBranchMiss label",
     646                        "/IEM/CPU%u/re/NativeTbExit/ReturnBreak/CheckBranchMiss", idCpu);
     647        /* Raising stuff will either increment NativeTbExit/LongJumps or NativeTbExit/ReturnOtherStatus
     648           depending on whether VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP is defined: */
     649#  ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP
     650#   define RAISE_PREFIX "/IEM/CPU%u/re/NativeTbExit/ReturnOtherStatus/"
     651#  else
     652#   define RAISE_PREFIX "/IEM/CPU%u/re/NativeTbExit/LongJumps/"
     653#  endif
    631654        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseDe, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    632                         "Number of times the TB finished raising a #DE exception", "/IEM/CPU%u/re/NativeTbExitRaiseDe", idCpu);
     655                        "Number of times the TB finished raising a #DE exception",
     656                        RAISE_PREFIX "RaiseDe", idCpu);
    633657        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseUd, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    634                         "Number of times the TB finished raising a #UD exception", "/IEM/CPU%u/re/NativeTbExitRaiseUd", idCpu);
     658                        "Number of times the TB finished raising a #UD exception",
     659                        RAISE_PREFIX "RaiseUd", idCpu);
    635660        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseSseRelated, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    636                         "Number of times the TB finished raising a SSE related exception", "/IEM/CPU%u/re/NativeTbExitRaiseSseRelated", idCpu);
     661                        "Number of times the TB finished raising a SSE related exception",
     662                        RAISE_PREFIX "RaiseSseRelated", idCpu);
    637663        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseAvxRelated, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    638                         "Number of times the TB finished raising a AVX related exception", "/IEM/CPU%u/re/NativeTbExitRaiseAvxRelated", idCpu);
     664                        "Number of times the TB finished raising a AVX related exception",
     665                        RAISE_PREFIX "RaiseAvxRelated", idCpu);
    639666        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseSseAvxFpRelated, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    640                         "Number of times the TB finished raising a SSE/AVX floating point related exception", "/IEM/CPU%u/re/NativeTbExitRaiseSseAvxFpRelated", idCpu);
     667                        "Number of times the TB finished raising a SSE/AVX floating point related exception",
     668                        RAISE_PREFIX "RaiseSseAvxFpRelated", idCpu);
    641669        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseNm, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    642                         "Number of times the TB finished raising a #NM exception", "/IEM/CPU%u/re/NativeTbExitRaiseNm", idCpu);
     670                        "Number of times the TB finished raising a #NM exception",
     671                        RAISE_PREFIX "RaiseNm", idCpu);
    643672        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseGp0, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    644                         "Number of times the TB finished raising a #GP(0) exception", "/IEM/CPU%u/re/NativeTbExitRaiseGp0", idCpu);
     673                        "Number of times the TB finished raising a #GP(0) exception",
     674                        RAISE_PREFIX "RaiseGp0", idCpu);
    645675        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseMf, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    646                         "Number of times the TB finished raising a #MF exception", "/IEM/CPU%u/re/NativeTbExitRaiseMf", idCpu);
     676                        "Number of times the TB finished raising a #MF exception",
     677                        RAISE_PREFIX "RaiseMf", idCpu);
    647678        STAMR3RegisterF(pVM, &pVCpu->iem.s.StatNativeTbExitRaiseXf, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
    648                         "Number of times the TB finished raising a #XF exception", "/IEM/CPU%u/re/NativeTbExitRaiseXf", idCpu);
     679                        "Number of times the TB finished raising a #XF exception",
     680                        RAISE_PREFIX "RaiseXf", idCpu);
     681
     682        RTStrPrintf(szPat, sizeof(szPat), "/IEM/CPU%u/re/NativeTbExit/*", idCpu); /* only immediate children, no sub folders */
     683        STAMR3RegisterSum(pVM->pUVM, STAMVISIBILITY_ALWAYS, szPat,
     684                          "Number of times native TB execution finished before the end (not counting thrown memory++ exceptions)",
     685                          "/IEM/CPU%u/re/NativeTbExit", idCpu);
     686
    649687
    650688# endif /* VBOX_WITH_IEM_NATIVE_RECOMPILER */
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r104383 r104407  
    19021902    R3PTRTYPE(PIEMTB)       pTbLookupEntryDummyR3;
    19031903
    1904     /** Statistics: Times TB execution was broken off before reaching the end. */
    1905     STAMCOUNTER             StatTbExecBreaks;
     1904    /** Threaded TB statistics: Times TB execution was broken off before reaching the end. */
     1905    STAMCOUNTER             StatTbThreadedExecBreaks;
    19061906    /** Statistics: Times BltIn_CheckIrq breaks out of the TB. */
    19071907    STAMCOUNTER             StatCheckIrqBreaks;
     
    20542054    /** Native recompiler: The TB finished executing jumping to the ReturnBreak label. */
    20552055    STAMCOUNTER             StatNativeTbExitReturnBreak;
     2056    /** Native recompiler: The TB finished executing jumping to the ReturnBreakFF label. */
     2057    STAMCOUNTER             StatNativeTbExitReturnBreakFF;
    20562058    /** Native recompiler: The TB finished executing jumping to the ReturnWithFlags label. */
    20572059    STAMCOUNTER             StatNativeTbExitReturnWithFlags;
     2060    /** Native recompiler: The TB finished executing with other non-zero status. */
     2061    STAMCOUNTER             StatNativeTbExitReturnOtherStatus;
     2062    /** Native recompiler: The TB finished executing via throw / long jump. */
     2063    STAMCOUNTER             StatNativeTbExitLongJump;
    20582064
    20592065    /** Native recompiler: The TB finished executing jumping to the RaiseDe label. */
     
    20782084    STAMCOUNTER             StatNativeTbExitObsoleteTb;
    20792085
    2080     uint64_t                au64Padding[4];
     2086    uint64_t                au64Padding[1];
    20812087    /** @} */
    20822088
  • trunk/src/VBox/VMM/include/IEMN8veRecompiler.h

    r104383 r104407  
    472472    kIemNativeLabelType_Return,
    473473    kIemNativeLabelType_ReturnBreak,
     474    kIemNativeLabelType_ReturnBreakFF,
    474475    kIemNativeLabelType_ReturnWithFlags,
    475476    kIemNativeLabelType_NonZeroRetOrPassUp,
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