VirtualBox

Changeset 367 in vbox for trunk


Ignore:
Timestamp:
Jan 26, 2007 5:06:04 PM (18 years ago)
Author:
vboxsync
Message:

Changed counting of patch page writes.

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

Legend:

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

    r347 r367  
    47094709                        PPATCHINFO pPatch = pPatchPage->aPatch[i];
    47104710
    4711                         if (++pPatch->cInvalidWrites > PATM_MAX_INVALID_WRITES)
     4711                        if (pPatch->cInvalidWrites > PATM_MAX_INVALID_WRITES)
    47124712                        {
    47134713                            LogRel(("PATM: Disable block at %VGv - invalid write %VGv-%VGv \n", pPatch->pPrivInstrGC, GCPtr, GCPtr+cbWrite));
  • trunk/src/VBox/VMM/PATM/PATMInternal.h

    r302 r367  
    318318    uint32_t           cMaxPatches;
    319319    /** Array of patch pointers for this page. */
    320     PPATCHINFO        *aPatch;
     320    HCPTRTYPE(PPATCHINFO *)aPatch;
    321321} PATMPATCHPAGE, *PPATMPATCHPAGE;
    322322
  • trunk/src/VBox/VMM/PATM/VMMGC/PATMGC.cpp

    r23 r367  
    125125            STAM_COUNTER_INC(&pVM->patm.s.StatPatchWriteInterpretedFailed);
    126126        }
     127        HCPTRTYPE(PPATCHINFO) *paPatch = (HCPTRTYPE(PPATCHINFO) *)MMHyperHC2GC(pVM, pPatchPage->aPatch);
     128
     129        /* Increase the invalid write counter for each patch that's registered for that page. */
     130        for (uint32_t i=0;i<pPatchPage->cCount;i++)
     131        {
     132            PPATCHINFO pPatch = (PPATCHINFO)MMHyperHC2GC(pVM, paPatch[i]);
     133
     134            pPatch->cInvalidWrites++;
     135        }
     136
    127137        STAM_PROFILE_ADV_STOP(&pVM->patm.s.StatPatchWriteDetect, a);
    128138        return VINF_EM_RAW_EMULATE_INSTR;
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