VirtualBox

Changeset 18595 in vbox


Ignore:
Timestamp:
Apr 1, 2009 12:17:30 PM (15 years ago)
Author:
vboxsync
Message:

REM: synced over TLB and TB stats from the old code.

Location:
trunk/src/recompiler_new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler_new/VBoxRecompiler.c

    r18280 r18595  
    143143static STAMCOUNTER    gStatSelOutOfSyncStateBack[6];
    144144static STAMCOUNTER    gStatFlushTBs;
     145/* in exec.c */
     146extern uint32_t       tlb_flush_count;
     147extern uint32_t       tb_flush_count;
     148extern uint32_t       tb_phys_invalidate_count;
    145149#endif
    146150
     
    214218#endif
    215219
     220/** Prologue code, must be in lower 4G to simplify jumps to/from generated code. */
     221uint8_t *code_gen_prologue;
     222
    216223
    217224/*******************************************************************************
     
    231238#endif
    232239
    233 
    234 /** Prologue code, must be in lower 4G to simplify jumps to/from generated code. */
    235 uint8_t *code_gen_prologue;
    236240
    237241/**
     
    380384    STAM_REG(pVM, &gStatSelOutOfSync[5],    STAMTYPE_COUNTER, "/REM/State/SelOutOfSync/GS",        STAMUNIT_OCCURENCES,     "GS out of sync");
    381385
    382     STAM_REG(pVM, &gStatSelOutOfSyncStateBack[0],    STAMTYPE_COUNTER, "/REM/StateBack/SelOutOfSync/ES",        STAMUNIT_OCCURENCES,     "ES out of sync");
    383     STAM_REG(pVM, &gStatSelOutOfSyncStateBack[1],    STAMTYPE_COUNTER, "/REM/StateBack/SelOutOfSync/CS",        STAMUNIT_OCCURENCES,     "CS out of sync");
    384     STAM_REG(pVM, &gStatSelOutOfSyncStateBack[2],    STAMTYPE_COUNTER, "/REM/StateBack/SelOutOfSync/SS",        STAMUNIT_OCCURENCES,     "SS out of sync");
    385     STAM_REG(pVM, &gStatSelOutOfSyncStateBack[3],    STAMTYPE_COUNTER, "/REM/StateBack/SelOutOfSync/DS",        STAMUNIT_OCCURENCES,     "DS out of sync");
    386     STAM_REG(pVM, &gStatSelOutOfSyncStateBack[4],    STAMTYPE_COUNTER, "/REM/StateBack/SelOutOfSync/FS",        STAMUNIT_OCCURENCES,     "FS out of sync");
    387     STAM_REG(pVM, &gStatSelOutOfSyncStateBack[5],    STAMTYPE_COUNTER, "/REM/StateBack/SelOutOfSync/GS",        STAMUNIT_OCCURENCES,     "GS out of sync");
    388 
    389     /** @todo missing /REM/Tb*Count stats */
    390 
    391 #endif
     386    STAM_REG(pVM, &gStatSelOutOfSyncStateBack[0],   STAMTYPE_COUNTER,   "/REM/StateBack/SelOutOfSync/ES",   STAMUNIT_OCCURENCES, "ES out of sync");
     387    STAM_REG(pVM, &gStatSelOutOfSyncStateBack[1],   STAMTYPE_COUNTER,   "/REM/StateBack/SelOutOfSync/CS",   STAMUNIT_OCCURENCES, "CS out of sync");
     388    STAM_REG(pVM, &gStatSelOutOfSyncStateBack[2],   STAMTYPE_COUNTER,   "/REM/StateBack/SelOutOfSync/SS",   STAMUNIT_OCCURENCES, "SS out of sync");
     389    STAM_REG(pVM, &gStatSelOutOfSyncStateBack[3],   STAMTYPE_COUNTER,   "/REM/StateBack/SelOutOfSync/DS",   STAMUNIT_OCCURENCES, "DS out of sync");
     390    STAM_REG(pVM, &gStatSelOutOfSyncStateBack[4],   STAMTYPE_COUNTER,   "/REM/StateBack/SelOutOfSync/FS",   STAMUNIT_OCCURENCES, "FS out of sync");
     391    STAM_REG(pVM, &gStatSelOutOfSyncStateBack[5],   STAMTYPE_COUNTER,   "/REM/StateBack/SelOutOfSync/GS",   STAMUNIT_OCCURENCES, "GS out of sync");
     392#endif /* VBOX_WITH_STATISTICS */
     393
     394    STAM_REL_REG(pVM, &tb_flush_count,              STAMTYPE_U32_RESET, "/REM/TbFlushCount",                STAMUNIT_OCCURENCES, "tb_flush() calls");
     395    STAM_REL_REG(pVM, &tb_phys_invalidate_count,    STAMTYPE_U32_RESET, "/REM/TbPhysInvldCount",            STAMUNIT_OCCURENCES, "tb_phys_invalidate() calls");
     396    STAM_REL_REG(pVM, &tlb_flush_count,             STAMTYPE_U32_RESET, "/REM/TlbFlushCount",               STAMUNIT_OCCURENCES, "tlb_flush() calls");
     397
    392398
    393399#ifdef DEBUG_ALL_LOGGING
     
    537543static DECLCALLBACK(int) remR3Save(PVM pVM, PSSMHANDLE pSSM)
    538544{
     545    PREM pRem = &pVM->rem.s;
     546
    539547    /*
    540548     * Save the required CPU Env bits.
    541549     * (Not much because we're never in REM when doing the save.)
    542550     */
    543     PREM pRem = &pVM->rem.s;
    544551    LogFlow(("remR3Save:\n"));
    545552    Assert(!pRem->fInREM);
  • trunk/src/recompiler_new/exec.c

    r18349 r18595  
    225225
    226226/* statistics */
     227#ifndef VBOX
    227228static int tlb_flush_count;
    228229static int tb_flush_count;
    229 #ifndef VBOX
    230230static int tb_phys_invalidate_count;
    231 #endif /* !VBOX */
     231#else  /* VBOX - Resettable U32 stats, see VBoxRecompiler.c. */
     232uint32_t tlb_flush_count;
     233uint32_t tb_flush_count;
     234uint32_t tb_phys_invalidate_count;
     235#endif /* VBOX */
    232236
    233237#define SUBPAGE_IDX(addr) ((addr) & ~TARGET_PAGE_MASK)
     
    934938    tb->jmp_first = (TranslationBlock *)((long)tb | 2); /* fail safe */
    935939
    936 #ifndef VBOX
    937940    tb_phys_invalidate_count++;
    938 #endif
    939941}
    940942
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