VirtualBox

Changeset 57884 in vbox for trunk/src/VBox/VMM/VMMR3/HM.cpp


Ignore:
Timestamp:
Sep 24, 2015 4:43:18 PM (9 years ago)
Author:
vboxsync
Message:

HM: More granular AMD-V patching stats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r57482 r57884  
    671671    STAM_REG(pVM, &pVM->hm.s.StatTprPatchSuccess,   STAMTYPE_COUNTER, "/HM/TPR/Patch/Success",  STAMUNIT_OCCURENCES, "Number of times an instruction was successfully patched.");
    672672    STAM_REG(pVM, &pVM->hm.s.StatTprPatchFailure,   STAMTYPE_COUNTER, "/HM/TPR/Patch/Failed",   STAMUNIT_OCCURENCES, "Number of unsuccessful patch attempts.");
    673     STAM_REG(pVM, &pVM->hm.s.StatTprReplaceSuccess, STAMTYPE_COUNTER, "/HM/TPR/Replace/Success",STAMUNIT_OCCURENCES, "Number of times an instruction was successfully patched.");
    674     STAM_REG(pVM, &pVM->hm.s.StatTprReplaceFailure, STAMTYPE_COUNTER, "/HM/TPR/Replace/Failed", STAMUNIT_OCCURENCES, "Number of unsuccessful patch attempts.");
     673    STAM_REG(pVM, &pVM->hm.s.StatTprReplaceSuccessCr8, STAMTYPE_COUNTER, "/HM/TPR/Replace/SuccessCR8",STAMUNIT_OCCURENCES, "Number of instruction replacements by MOV CR8.");
     674    STAM_REG(pVM, &pVM->hm.s.StatTprReplaceSuccessVmc, STAMTYPE_COUNTER, "/HM/TPR/Replace/SuccessVMC",STAMUNIT_OCCURENCES, "Number of instruction replacements by VMMCALL.");
     675    STAM_REG(pVM, &pVM->hm.s.StatTprReplaceFailure, STAMTYPE_COUNTER, "/HM/TPR/Replace/Failed", STAMUNIT_OCCURENCES, "Number of unsuccessful replace attempts.");
    675676#endif
    676677
     
    19941995            memcpy(pPatch->aNewOpcode, s_abVMMCall, sizeof(s_abVMMCall));
    19951996            pPatch->cbNewOp = sizeof(s_abVMMCall);
     1997            STAM_COUNTER_INC(&pVM->hm.s.StatTprReplaceSuccessVmc);
    19961998        }
    19971999        else
     
    20462048                memcpy(pPatch->aNewOpcode, abInstr, pPatch->cbOp);
    20472049                pPatch->cbNewOp = pPatch->cbOp;
     2050                STAM_COUNTER_INC(&pVM->hm.s.StatTprReplaceSuccessCr8);
    20482051
    20492052                Log(("Acceptable read/shr candidate!\n"));
     
    20602063                memcpy(pPatch->aNewOpcode, s_abVMMCall, sizeof(s_abVMMCall));
    20612064                pPatch->cbNewOp = sizeof(s_abVMMCall);
     2065                STAM_COUNTER_INC(&pVM->hm.s.StatTprReplaceSuccessVmc);
    20622066                Log(("hmR3ReplaceTprInstr: HMTPRINSTR_READ %u\n", pPatch->uDstOperand));
    20632067            }
     
    20692073
    20702074        pVM->hm.s.cPatches++;
    2071         STAM_COUNTER_INC(&pVM->hm.s.StatTprReplaceSuccess);
    20722075        return VINF_SUCCESS;
    20732076    }
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