VirtualBox

Changeset 39034 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Oct 19, 2011 11:43:52 AM (13 years ago)
Author:
vboxsync
Message:

VMM,INTNET: Addressing unused variable warnings.

Location:
trunk/src/VBox/VMM/VMMR3
Files:
22 edited

Legend:

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

    r35625 r39034  
    264264static DECLCALLBACK(int) cpumR3RegGstGet_crX(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
    265265{
    266     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    267     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
    268 
     266    PVMCPU pVCpu = (PVMCPU)pvUser;
    269267    VMCPU_ASSERT_EMT(pVCpu);
    270268
     
    289287{
    290288    int         rc;
    291     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    292     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
     289    PVMCPU      pVCpu = (PVMCPU)pvUser;
    293290
    294291    VMCPU_ASSERT_EMT(pVCpu);
     
    346343static DECLCALLBACK(int) cpumR3RegGstGet_drX(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
    347344{
    348     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    349     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
    350 
     345    PVMCPU pVCpu = (PVMCPU)pvUser;
    351346    VMCPU_ASSERT_EMT(pVCpu);
    352347
     
    371366{
    372367    int         rc;
    373     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    374     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
     368    PVMCPU      pVCpu = (PVMCPU)pvUser;
    375369
    376370    VMCPU_ASSERT_EMT(pVCpu);
     
    418412static DECLCALLBACK(int) cpumR3RegGstGet_msr(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
    419413{
    420     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    421     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
    422 
    423     VMCPU_ASSERT_EMT(pVCpu);
     414    PVMCPU pVCpu = (PVMCPU)pvUser;
     415    VMCPU_ASSERT_EMT(pVCpu);
     416
    424417    uint64_t u64Value;
    425418    int rc = CPUMQueryGuestMsr(pVCpu, pDesc->offRegister, &u64Value);
     
    447440    int         rc;
    448441    PVMCPU      pVCpu   = (PVMCPU)pvUser;
    449     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
    450442
    451443    VMCPU_ASSERT_EMT(pVCpu);
     
    498490static DECLCALLBACK(int) cpumR3RegGstGet_stN(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
    499491{
    500     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    501     void const *pv      = (uint8_t const *)&pVCpu->cpum.s.Guest + pDesc->offRegister;
    502 
     492    PVMCPU pVCpu = (PVMCPU)pvUser;
    503493    VMCPU_ASSERT_EMT(pVCpu);
    504494    Assert(pDesc->enmType == DBGFREGVALTYPE_R80);
     
    587577static DECLCALLBACK(int) cpumR3RegHyperGet_drX(void *pvUser, PCDBGFREGDESC pDesc, PDBGFREGVAL pValue)
    588578{
    589     PVMCPU      pVCpu   = (PVMCPU)pvUser;
    590     void const *pv      = (uint8_t const *)&pVCpu->cpum + pDesc->offRegister;
    591 
     579    PVMCPU pVCpu = (PVMCPU)pvUser;
    592580    VMCPU_ASSERT_EMT(pVCpu);
    593581
  • trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp

    r35346 r39034  
    396396        ASMAtomicXchgHandle(&pVM->dbgf.s.ahAsAliases[DBGF_AS_ALIAS_2_INDEX(hAlias)], hRealAliasFor, &hAsOld);
    397397        uint32_t cRefs = RTDbgAsRelease(hAsOld);
    398         Assert(cRefs > 0);
    399         Assert(cRefs != UINT32_MAX);
     398        Assert(cRefs > 0); Assert(cRefs != UINT32_MAX); NOREF(cRefs);
    400399        rc = VINF_SUCCESS;
    401400    }
  • trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp

    r38838 r39034  
    471471            {
    472472                bool fInserted2 = RTStrSpaceInsert(&pVM->dbgf.s.RegSpace, &paLookupRecs[iLookupRec].Core);
    473                 AssertMsg(fInserted2, ("'%s'", paLookupRecs[iLookupRec].Core.pszString));
     473                AssertMsg(fInserted2, ("'%s'", paLookupRecs[iLookupRec].Core.pszString)); NOREF(fInserted2);
    474474            }
    475475
     
    17251725static void dbgfR3RegNmQueryAllInSet(PCDBGFREGSET pSet, size_t cRegsToQuery, PDBGFREGENTRYNM paRegs, size_t cRegs)
    17261726{
    1727     int rc = VINF_SUCCESS;
    1728 
    17291727    if (cRegsToQuery > pSet->cDescs)
    17301728        cRegsToQuery = pSet->cDescs;
  • trunk/src/VBox/VMM/VMMR3/EMHwaccm.cpp

    r35346 r39034  
    182182#endif
    183183{
     184#ifdef LOG_ENABLED
    184185    PCPUMCTX pCtx = pVCpu->em.s.pCtx;
     186#endif
    185187    int      rc;
    186188
  • trunk/src/VBox/VMM/VMMR3/FTM.cpp

    r38838 r39034  
    882882                pNode->pPage = (void *)(pNode + 1);
    883883                bool fRet = RTAvlGCPhysInsert(&pVM->ftm.s.standby.pPhysPageTree, &pNode->Core);
    884                 Assert(fRet);
     884                Assert(fRet); NOREF(fRet);
    885885            }
    886886
     
    10181018        return VINF_SUCCESS;
    10191019
    1020     /** todo: verify VM config. */
     1020    /** @todo verify VM config. */
    10211021
    10221022    /*
     
    10311031     * Command processing loop.
    10321032     */
    1033     bool fDone = false;
     1033    //bool fDone = false;
    10341034    for (;;)
    10351035    {
  • trunk/src/VBox/VMM/VMMR3/HWACCM.cpp

    r38838 r39034  
    15601560    for (VMCPUID i = 0; i < pVM->cCpus; i++)
    15611561    {
    1562         PVMCPU pVCpu = &pVM->aCpus[i];
     1562        PVMCPU pVCpu = &pVM->aCpus[i]; NOREF(pVCpu);
    15631563
    15641564#ifdef VBOX_WITH_STATISTICS
  • trunk/src/VBox/VMM/VMMR3/PATM.cpp

    r36969 r39034  
    56265626        /* Put the new patch back into the tree, because removing the old one kicked this one out. (hack alert) */
    56275627        bool fInserted = RTAvloU32Insert(&pVM->patm.s.PatchLookupTreeHC->PatchTree, &pNewPatchRec->Core);
    5628         Assert(fInserted);
     5628        Assert(fInserted); NOREF(fInserted);
    56295629
    56305630        LogRel(("PATM: patmR3RefreshPatch: succeeded to refresh patch at %RRv \n", pInstrGC));
     
    56785678        /* Put the old patch back into the tree (or else it won't be saved) (hack alert) */
    56795679        bool fInserted = RTAvloU32Insert(&pVM->patm.s.PatchLookupTreeHC->PatchTree, &pPatchRec->Core);
    5680         Assert(fInserted);
     5680        Assert(fInserted); NOREF(fInserted);
    56815681
    56825682        /* Enable again in case the dirty instruction is near the end and there are safe code paths. */
  • trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp

    r39031 r39034  
    10851085                           size_t cbRead)
    10861086{
     1087#ifdef VBOX_WITH_STATISTICS
    10871088    PPDMASYNCCOMPLETIONENDPOINTFILE pEpFile = (PPDMASYNCCOMPLETIONENDPOINTFILE)pEndpoint;
     1089#endif
    10881090
    10891091    LogFlowFunc(("pTask=%#p pEndpoint=%#p off=%RTfoff paSegments=%#p cSegments=%zu cbRead=%zu\n",
  • trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp

    r37596 r39034  
    11/* $Id$ */
    22/** @file
    3  * PDM Async I/O - Transport data asynchronous in R3 using EMT.
    4  * Async File I/O manager.
     3 * PDM Async I/O - Async File I/O manager.
    54 */
    65
    76/*
    8  * Copyright (C) 2006-2008 Oracle Corporation
     7 * Copyright (C) 2006-2011 Oracle Corporation
    98 *
    109 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1615 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1716 */
     17
     18/*******************************************************************************
     19*   Header Files                                                               *
     20*******************************************************************************/
    1821#define LOG_GROUP LOG_GROUP_PDM_ASYNC_COMPLETION
    1922#define RT_STRICT
     
    2932
    3033/** The update period for the I/O load statistics in ms. */
    31 #define PDMACEPFILEMGR_LOAD_UPDATE_PERIOD 1000
     34#define PDMACEPFILEMGR_LOAD_UPDATE_PERIOD   1000
    3235/** Maximum number of requests a manager will handle. */
    33 #define PDMACEPFILEMGR_REQS_STEP 512
     36#define PDMACEPFILEMGR_REQS_STEP            512
     37
    3438
    3539/*******************************************************************************
     
    4751                                               int rc, size_t cbTransfered);
    4852
     53
    4954int pdmacFileAioMgrNormalInit(PPDMACEPFILEMGR pAioMgr)
    5055{
    51     int rc = VINF_SUCCESS;
    52 
    5356    pAioMgr->cRequestsActiveMax = PDMACEPFILEMGR_REQS_STEP;
    5457
    55     rc = RTFileAioCtxCreate(&pAioMgr->hAioCtx, RTFILEAIO_UNLIMITED_REQS);
     58    int rc = RTFileAioCtxCreate(&pAioMgr->hAioCtx, RTFILEAIO_UNLIMITED_REQS);
    5659    if (rc == VERR_OUT_OF_RANGE)
    5760        rc = RTFileAioCtxCreate(&pAioMgr->hAioCtx, pAioMgr->cRequestsActiveMax);
     
    245248static void pdmacFileAioMgrNormalBalanceLoad(PPDMACEPFILEMGR pAioMgr)
    246249{
    247     PPDMACEPFILEMGR pAioMgrNew = NULL;
    248     int rc = VINF_SUCCESS;
    249 
    250250    /*
    251251     * Check if balancing would improve the situation.
     
    253253    if (pdmacFileAioMgrNormalIsBalancePossible(pAioMgr))
    254254    {
    255         PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pAioMgr->pEndpointsHead->Core.pEpClass;
    256 
    257         rc = pdmacFileAioMgrCreate(pEpClassFile, &pAioMgrNew, PDMACEPFILEMGRTYPE_ASYNC);
     255        PPDMASYNCCOMPLETIONEPCLASSFILE  pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pAioMgr->pEndpointsHead->Core.pEpClass;
     256        PPDMACEPFILEMGR                 pAioMgrNew = NULL;
     257
     258        int rc = pdmacFileAioMgrCreate(pEpClassFile, &pAioMgrNew, PDMACEPFILEMGRTYPE_ASYNC);
    258259        if (RT_SUCCESS(rc))
    259260        {
     
    323324static int pdmacFileAioMgrNormalGrow(PPDMACEPFILEMGR pAioMgr)
    324325{
    325     int rc = VINF_SUCCESS;
    326     RTFILEAIOCTX hAioCtxNew = NIL_RTFILEAIOCTX;
    327 
    328326    LogFlowFunc(("pAioMgr=%#p\n", pAioMgr));
    329327
     
    342340    {
    343341        RTFileClose(pCurr->hFile);
    344         rc = RTFileOpen(&pCurr->hFile, pCurr->Core.pszUri, pCurr->fFlags);
    345         AssertRC(rc);
     342        int rc2 = RTFileOpen(&pCurr->hFile, pCurr->Core.pszUri, pCurr->fFlags); AssertRC(rc);
    346343
    347344        pCurr = pCurr->AioMgr.pEndpointNext;
     
    352349    pAioMgr->cRequestsActiveMax += PDMACEPFILEMGR_REQS_STEP;
    353350
    354     rc = RTFileAioCtxCreate(&hAioCtxNew, RTFILEAIO_UNLIMITED_REQS);
     351    RTFILEAIOCTX hAioCtxNew = NIL_RTFILEAIOCTX;
     352    int rc = RTFileAioCtxCreate(&hAioCtxNew, RTFILEAIO_UNLIMITED_REQS);
    355353    if (rc == VERR_OUT_OF_RANGE)
    356354        rc = RTFileAioCtxCreate(&hAioCtxNew, pAioMgr->cRequestsActiveMax);
     
    360358        /* Close the old context. */
    361359        rc = RTFileAioCtxDestroy(pAioMgr->hAioCtx);
    362         AssertRC(rc);
     360        AssertRC(rc); /** @todo r=bird: Ignoring error code, will propagate. */
    363361
    364362        pAioMgr->hAioCtx = hAioCtxNew;
     
    387385    /* Assign the file to the new context. */
    388386    pCurr = pAioMgr->pEndpointsHead;
    389 
    390387    while (pCurr)
    391388    {
    392389        rc = RTFileAioCtxAssociateWithFile(pAioMgr->hAioCtx, pCurr->hFile);
    393         AssertRC(rc);
     390        AssertRC(rc); /** @todo r=bird: Ignoring error code, will propagate. */
    394391
    395392        pCurr = pCurr->AioMgr.pEndpointNext;
     
    420417DECLINLINE(bool) pdmacFileAioMgrNormalRcIsFatal(int rcReq)
    421418{
    422     return    rcReq == VERR_DEV_IO_ERROR
    423            || rcReq == VERR_FILE_IO_ERROR
    424            || rcReq == VERR_DISK_IO_ERROR
    425            || rcReq == VERR_DISK_FULL
    426            || rcReq == VERR_FILE_TOO_BIG;
     419    return rcReq == VERR_DEV_IO_ERROR
     420        || rcReq == VERR_FILE_IO_ERROR
     421        || rcReq == VERR_DISK_IO_ERROR
     422        || rcReq == VERR_DISK_FULL
     423        || rcReq == VERR_FILE_TOO_BIG;
    427424}
    428425
     
    504501static RTFILEAIOREQ pdmacFileAioMgrNormalRequestAlloc(PPDMACEPFILEMGR pAioMgr)
    505502{
    506     RTFILEAIOREQ hReq = NIL_RTFILEAIOREQ;
    507 
    508503    /* Get a request handle. */
     504    RTFILEAIOREQ hReq;
    509505    if (pAioMgr->iFreeEntry > 0)
    510506    {
     
    517513    {
    518514        int rc = RTFileAioReqCreate(&hReq);
    519         AssertRC(rc);
     515        AssertRCReturn(rc, NIL_RTFILEAIOREQ);
    520516    }
    521517
     
    546542                                            PRTFILEAIOREQ pahReqs, unsigned cReqs)
    547543{
    548     int rc;
    549 
    550544    pAioMgr->cRequestsActive += cReqs;
    551545    pEndpoint->AioMgr.cRequestsActive += cReqs;
     
    554548    LogFlow(("Endpoint has a total of %d active requests now\n", pEndpoint->AioMgr.cRequestsActive));
    555549
    556     rc = RTFileAioCtxSubmit(pAioMgr->hAioCtx, pahReqs, cReqs);
     550    int rc = RTFileAioCtxSubmit(pAioMgr->hAioCtx, pahReqs, cReqs);
    557551    if (RT_FAILURE(rc))
    558552    {
     
    612606                }
    613607                else if (rcReq != VERR_FILE_AIO_IN_PROGRESS)
    614                 {
    615                     PPDMACTASKFILE pTask = (PPDMACTASKFILE)RTFileAioReqGetUser(pahReqs[i]);
    616 
    617608                    pdmacFileAioMgrNormalReqCompleteRc(pAioMgr, pahReqs[i], rcReq, 0);
    618                 }
    619609            }
    620610
     
    645635                                               PPDMACTASKFILE pTask)
    646636{
    647     PPDMACFILERANGELOCK pRangeLock = NULL; /** < Range lock */
    648 
    649637    AssertMsg(   pTask->enmTransferType == PDMACTASKFILETRANSFER_WRITE
    650638              || pTask->enmTransferType == PDMACTASKFILETRANSFER_READ,
    651639                 ("Invalid task type %d\n", pTask->enmTransferType));
    652640
     641    PPDMACFILERANGELOCK pRangeLock;
    653642    pRangeLock = (PPDMACFILERANGELOCK)RTAvlrFileOffsetRangeGet(pEndpoint->AioMgr.pTreeRangesLocked, offStart);
    654643    if (!pRangeLock)
     
    666655    /* Check whether we have one of the situations explained below */
    667656    if (   pRangeLock
    668 #if 0 /** @todo: later. For now we will just block all requests if they interfere */
     657#if 0 /** @todo later. For now we will just block all requests if they interfere */
    669658        && (   (pRangeLock->fReadLock && pTask->enmTransferType == PDMACTASKFILETRANSFER_WRITE)
    670659            || (!pRangeLock->fReadLock)
     
    745734                                                    PPDMACTASKFILE pTask, PRTFILEAIOREQ phReq)
    746735{
    747     int rc = VINF_SUCCESS;
    748     RTFILEAIOREQ hReq = NIL_RTFILEAIOREQ;
    749     PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pEndpoint->Core.pEpClass;
    750     void *pvBuf = pTask->DataSeg.pvSeg;
    751 
    752736    AssertMsg(   pTask->enmTransferType == PDMACTASKFILETRANSFER_WRITE
    753                 || (uint64_t)(pTask->Off + pTask->DataSeg.cbSeg) <= pEndpoint->cbFile,
    754                 ("Read exceeds file size offStart=%RTfoff cbToTransfer=%d cbFile=%llu\n",
    755                 pTask->Off, pTask->DataSeg.cbSeg, pEndpoint->cbFile));
     737              || (uint64_t)(pTask->Off + pTask->DataSeg.cbSeg) <= pEndpoint->cbFile,
     738              ("Read exceeds file size offStart=%RTfoff cbToTransfer=%d cbFile=%llu\n",
     739               pTask->Off, pTask->DataSeg.cbSeg, pEndpoint->cbFile));
    756740
    757741    pTask->fPrefetch = false;
     
    776760     * the same range. This will result in data corruption if both are executed concurrently.
    777761     */
     762    int  rc = VINF_SUCCESS;
    778763    bool fLocked = pdmacFileAioMgrNormalIsRangeLocked(pEndpoint, pTask->Off, pTask->DataSeg.cbSeg, pTask);
    779 
    780764    if (!fLocked)
    781765    {
    782766        /* Get a request handle. */
    783         hReq = pdmacFileAioMgrNormalRequestAlloc(pAioMgr);
     767        RTFILEAIOREQ hReq = pdmacFileAioMgrNormalRequestAlloc(pAioMgr);
    784768        AssertMsg(hReq != NIL_RTFILEAIOREQ, ("Out of request handles\n"));
    785769
     
    823807                                                       PPDMACTASKFILE pTask, PRTFILEAIOREQ phReq)
    824808{
    825     int rc = VINF_SUCCESS;
    826     RTFILEAIOREQ hReq = NIL_RTFILEAIOREQ;
    827     PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pEndpoint->Core.pEpClass;
    828     void *pvBuf = pTask->DataSeg.pvSeg;
    829 
    830809    /*
    831810     * Check if the alignment requirements are met.
     
    862841     * the same range. This will result in data corruption if both are executed concurrently.
    863842     */
     843    int  rc = VINF_SUCCESS;
    864844    bool fLocked = pdmacFileAioMgrNormalIsRangeLocked(pEndpoint, offStart, cbToTransfer, pTask);
    865 
    866845    if (!fLocked)
    867846    {
     847        PPDMASYNCCOMPLETIONEPCLASSFILE  pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pEndpoint->Core.pEpClass;
     848        void                           *pvBuf        = pTask->DataSeg.pvSeg;
     849
    868850        /* Get a request handle. */
    869         hReq = pdmacFileAioMgrNormalRequestAlloc(pAioMgr);
     851        RTFILEAIOREQ hReq = pdmacFileAioMgrNormalRequestAlloc(pAioMgr);
    870852        AssertMsg(hReq != NIL_RTFILEAIOREQ, ("Out of request handles\n"));
    871853
     
    963945    RTFILEAIOREQ  apReqs[20];
    964946    unsigned      cRequests = 0;
    965     unsigned      cMaxRequests = pAioMgr->cRequestsActiveMax - pAioMgr->cRequestsActive;
    966     int           rc = VINF_SUCCESS;
     947    int           rc        = VINF_SUCCESS;
    967948
    968949    AssertMsg(pEndpoint->enmState == PDMASYNCCOMPLETIONENDPOINTFILESTATE_ACTIVE,
     
    11471128        pEndpoint->AioMgr.pReqsPendingTail = NULL;
    11481129        rc = pdmacFileAioMgrNormalProcessTaskList(pTasksHead, pAioMgr, pEndpoint);
    1149         AssertRC(rc);
     1130        AssertRC(rc);                   /** @todo r=bird: status code potentially overwritten.  */
    11501131    }
    11511132
     
    15921573int pdmacFileAioMgrNormal(RTTHREAD ThreadSelf, void *pvUser)
    15931574{
    1594     int rc                  = VINF_SUCCESS;
    1595     PPDMACEPFILEMGR pAioMgr = (PPDMACEPFILEMGR)pvUser;
    1596     uint64_t uMillisEnd     = RTTimeMilliTS() + PDMACEPFILEMGR_LOAD_UPDATE_PERIOD;
    1597 
    1598     while (   (pAioMgr->enmState == PDMACEPFILEMGRSTATE_RUNNING)
    1599            || (pAioMgr->enmState == PDMACEPFILEMGRSTATE_SUSPENDING)
    1600            || (pAioMgr->enmState == PDMACEPFILEMGRSTATE_GROWING))
     1575    int             rc          = VINF_SUCCESS;
     1576    PPDMACEPFILEMGR pAioMgr     = (PPDMACEPFILEMGR)pvUser;
     1577    uint64_t        uMillisEnd  = RTTimeMilliTS() + PDMACEPFILEMGR_LOAD_UPDATE_PERIOD;
     1578
     1579    while (   pAioMgr->enmState == PDMACEPFILEMGRSTATE_RUNNING
     1580           || pAioMgr->enmState == PDMACEPFILEMGRSTATE_SUSPENDING
     1581           || pAioMgr->enmState == PDMACEPFILEMGRSTATE_GROWING)
    16011582    {
    16021583        if (!pAioMgr->cRequestsActive)
  • trunk/src/VBox/VMM/VMMR3/PDMBlkCache.cpp

    r38880 r39034  
    953953                /* Insert into the tree. */
    954954                bool fInserted = RTAvlrU64Insert(pBlkCache->pTree, &pEntry->Core);
    955                 Assert(fInserted);
     955                Assert(fInserted); NOREF(fInserted);
    956956
    957957                /* Add to the dirty list. */
     
    15451545static PPDMBLKCACHEENTRY pdmBlkCacheGetCacheEntryByOffset(PPDMBLKCACHE pBlkCache, uint64_t off)
    15461546{
    1547     PPDMBLKCACHEGLOBAL pCache = pBlkCache->pCache;
    1548     PPDMBLKCACHEENTRY pEntry = NULL;
    1549 
    1550     STAM_PROFILE_ADV_START(&pCache->StatTreeGet, Cache);
     1547    STAM_PROFILE_ADV_START(&pBlkCache->pCache->StatTreeGet, Cache);
    15511548
    15521549    RTSemRWRequestRead(pBlkCache->SemRWEntries, RT_INDEFINITE_WAIT);
    1553     pEntry = (PPDMBLKCACHEENTRY)RTAvlrU64RangeGet(pBlkCache->pTree, off);
     1550    PPDMBLKCACHEENTRY pEntry = (PPDMBLKCACHEENTRY)RTAvlrU64RangeGet(pBlkCache->pTree, off);
    15541551    if (pEntry)
    15551552        pdmBlkCacheEntryRef(pEntry);
    15561553    RTSemRWReleaseRead(pBlkCache->SemRWEntries);
    15571554
    1558     STAM_PROFILE_ADV_STOP(&pCache->StatTreeGet, Cache);
     1555    STAM_PROFILE_ADV_STOP(&pBlkCache->pCache->StatTreeGet, Cache);
    15591556
    15601557    return pEntry;
     
    15731570                                                    PPDMBLKCACHEENTRY *ppEntryAbove)
    15741571{
    1575     PPDMBLKCACHEGLOBAL pCache = pBlkCache->pCache;
    1576 
    1577     STAM_PROFILE_ADV_START(&pCache->StatTreeGet, Cache);
     1572    STAM_PROFILE_ADV_START(&pBlkCache->pCache->StatTreeGet, Cache);
    15781573
    15791574    RTSemRWRequestRead(pBlkCache->SemRWEntries, RT_INDEFINITE_WAIT);
     
    15871582    RTSemRWReleaseRead(pBlkCache->SemRWEntries);
    15881583
    1589     STAM_PROFILE_ADV_STOP(&pCache->StatTreeGet, Cache);
     1584    STAM_PROFILE_ADV_STOP(&pBlkCache->pCache->StatTreeGet, Cache);
    15901585}
    15911586
    15921587static void pdmBlkCacheInsertEntry(PPDMBLKCACHE pBlkCache, PPDMBLKCACHEENTRY pEntry)
    15931588{
    1594     PPDMBLKCACHEGLOBAL pCache = pBlkCache->pCache;
    1595 
    1596     STAM_PROFILE_ADV_START(&pCache->StatTreeInsert, Cache);
     1589    STAM_PROFILE_ADV_START(&pBlkCache->pCache->StatTreeInsert, Cache);
    15971590    RTSemRWRequestWrite(pBlkCache->SemRWEntries, RT_INDEFINITE_WAIT);
    15981591    bool fInserted = RTAvlrU64Insert(pBlkCache->pTree, &pEntry->Core);
    1599     AssertMsg(fInserted, ("Node was not inserted into tree\n"));
    1600     STAM_PROFILE_ADV_STOP(&pCache->StatTreeInsert, Cache);
     1592    AssertMsg(fInserted, ("Node was not inserted into tree\n")); NOREF(fInserted);
     1593    STAM_PROFILE_ADV_STOP(&pBlkCache->pCache->StatTreeInsert, Cache);
    16011594    RTSemRWReleaseWrite(pBlkCache->SemRWEntries);
    16021595}
     
    24752468                        {
    24762469                            pdmBlkCacheLockEnter(pCache);
    2477                             pdmBlkCacheEntryRemoveFromList(pEntry); 
     2470                            pdmBlkCacheEntryRemoveFromList(pEntry);
    24782471
    24792472                            STAM_PROFILE_ADV_START(&pCache->StatTreeRemove, Cache);
     
    25212514                        {
    25222515                            pdmBlkCacheLockEnter(pCache);
    2523                             pdmBlkCacheEntryRemoveFromList(pEntry); 
     2516                            pdmBlkCacheEntryRemoveFromList(pEntry);
    25242517
    25252518                            RTSemRWRequestWrite(pBlkCache->SemRWEntries, RT_INDEFINITE_WAIT);
     
    25382531                {
    25392532                    pdmBlkCacheLockEnter(pCache);
    2540                     pdmBlkCacheEntryRemoveFromList(pEntry); 
     2533                    pdmBlkCacheEntryRemoveFromList(pEntry);
    25412534
    25422535                    RTSemRWRequestWrite(pBlkCache->SemRWEntries, RT_INDEFINITE_WAIT);
     
    25812574    PPDMBLKCACHEREQ pReq = pWaiter->pReq;
    25822575
    2583     pdmBlkCacheReqUpdate(pBlkCache, pWaiter->pReq, rc, true);
     2576    pdmBlkCacheReqUpdate(pBlkCache, pReq, rc, true);
    25842577
    25852578    RTMemFree(pWaiter);
  • trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp

    r37879 r39034  
    12101210    PVM pVM = pUsbIns->Internal.s.pVM;
    12111211    VM_ASSERT_EMT(pVM);
    1212     /** @todo int rc = DBGFR3InfoRegisterUsb(pVM, pszName, pszDesc, pfnHandler, pUsbIns); */
     1212    NOREF(pVM); /** @todo int rc = DBGFR3InfoRegisterUsb(pVM, pszName, pszDesc, pfnHandler, pUsbIns); */
    12131213    int rc = VERR_NOT_IMPLEMENTED; AssertFailed();
    12141214
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r38953 r39034  
    32963296VMMR3DECL(int) PGMR3ChangeMode(PVM pVM, PVMCPU pVCpu, PGMMODE enmGuestMode)
    32973297{
     3298#if HC_ARCH_BITS == 32
    32983299    bool fIsOldGuestPagingMode64Bits = (pVCpu->pgm.s.enmGuestMode >= PGMMODE_AMD64);
     3300#endif
    32993301    bool fIsNewGuestPagingMode64Bits = (enmGuestMode >= PGMMODE_AMD64);
    33003302
  • trunk/src/VBox/VMM/VMMR3/PGMDbg.cpp

    r37187 r39034  
    204204    /* partial read that failed, chop it up in pages. */
    205205    *pcbRead = 0;
    206     size_t const cbReq = cb;
    207206    rc = VINF_SUCCESS;
    208207    while (cb > 0)
     
    14661465
    14671466    uint32_t iFirst, iLast;
    1468     uint64_t u64BaseAddress = pgmR3DumpHierarchyCalcRange(pState, X86_PD_SHIFT, X86_PG_ENTRIES, &iFirst, &iLast);
     1467    pgmR3DumpHierarchyCalcRange(pState, X86_PD_SHIFT, X86_PG_ENTRIES, &iFirst, &iLast);
    14691468    for (uint32_t i = iFirst; i <= iLast; i++)
    14701469    {
     
    21432142
    21442143    uint32_t iFirst, iLast;
    2145     uint64_t u64BaseAddress = pgmR3DumpHierarchyCalcRange(pState, X86_PD_SHIFT, X86_PG_ENTRIES, &iFirst, &iLast);
     2144    pgmR3DumpHierarchyCalcRange(pState, X86_PD_SHIFT, X86_PG_ENTRIES, &iFirst, &iLast);
    21462145    for (uint32_t i = iFirst; i <= iLast; i++)
    21472146    {
  • trunk/src/VBox/VMM/VMMR3/PGMMap.cpp

    r36891 r39034  
    10171017{
    10181018    PPGM   pPGM  = &pVM->pgm.s;
     1019#ifdef VBOX_STRICT
    10191020    PVMCPU pVCpu = VMMGetCpu(pVM);
     1021#endif
    10201022    pgmLock(pVM);                           /* to avoid assertions */
    10211023
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r38956 r39034  
    42624262
    42634263#ifdef VBOX_STRICT
    4264         bool fOk = true;
    42654264        uint32_t i;
    42664265        for (i = iClear; i < pVM->pgm.s.cHandyPages; i++)
  • trunk/src/VBox/VMM/VMMR3/PGMPool.cpp

    r37354 r39034  
    853853        /* First write protect the page again to catch all write accesses. (before checking for changes -> SMP) */
    854854        int rc = PGMHandlerPhysicalReset(pVM, pPage->GCPhys & PAGE_BASE_GC_MASK);
    855         Assert(rc == VINF_SUCCESS);
     855        AssertRCSuccess(rc);
    856856        pPage->fDirty = false;
    857857
  • trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp

    r38953 r39034  
    30973097static DECLCALLBACK(int) pgmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
    30983098{
    3099     int     rc;
    3100     PPGM    pPGM = &pVM->pgm.s;
     3099    int rc;
    31013100
    31023101    /*
  • trunk/src/VBox/VMM/VMMR3/PGMSharedPage.cpp

    r38953 r39034  
    219219    /* We must stall other VCPUs as we'd otherwise have to send IPI flush commands for every single change we make. */
    220220    int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE, pgmR3SharedModuleRegRendezvous, &idCpu);
    221     Assert(rc == VINF_SUCCESS);
     221    AssertRCSuccess(rc);
    222222}
    223223#endif
  • trunk/src/VBox/VMM/VMMR3/PGMShw.h

    r35333 r39034  
    186186    PPGMPOOLPAGE pNewShwPageCR3;
    187187    PVM          pVM       = pVCpu->pVMR3;
    188     PPGMPOOL     pPool     = pVM->pgm.s.CTX_SUFF(pPool);
    189188
    190189    Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging);
  • trunk/src/VBox/VMM/VMMR3/SELM.cpp

    r35346 r39034  
    18401840     * Figure out the size of what need to monitor.
    18411841     */
    1842     bool fNoRing1Stack = true;
    18431842    /* We're not interested in any 16-bit TSSes. */
    18441843    uint32_t cbMonitoredTss = cbTss;
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r38838 r39034  
    15371537         * Change to the DESTROY state.
    15381538         */
    1539         TMTIMERSTATE enmState    = pTimer->enmState;
    1540         TMTIMERSTATE enmNewState = enmState;
     1539        TMTIMERSTATE const enmState = pTimer->enmState;
    15411540        Log2(("TMTimerDestroy: %p:{.enmState=%s, .pszDesc='%s'} cRetries=%d\n",
    15421541              pTimer, tmTimerState(enmState), R3STRING(pTimer->pszDesc), cRetries));
     
    21282127
    21292128        /* Check if stopped by expired timer. */
    2130         uint64_t u64Expire = pNext->u64Expire;
    2131         if (u64Now >= pNext->u64Expire)
     2129        uint64_t const u64Expire = pNext->u64Expire;
     2130        if (u64Now >= u64Expire)
    21322131        {
    21332132            STAM_COUNTER_INC(&pVM->tm.s.StatVirtualSyncRunStop);
    2134             u64Now = pNext->u64Expire;
     2133            u64Now = u64Expire;
    21352134            ASMAtomicWriteU64(&pVM->tm.s.u64VirtualSync, u64Now);
    21362135            ASMAtomicWriteBool(&pVM->tm.s.fVirtualSyncTicking, false);
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r38838 r39034  
    17671767            {
    17681768                int rc2 = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)SSMR3LiveDone, 1, pSSM);
    1769                 AssertMsg(rc2 == rc, ("%Rrc != %Rrc\n", rc2, rc));
     1769                AssertMsg(rc2 == rc, ("%Rrc != %Rrc\n", rc2, rc)); NOREF(rc2);
    17701770            }
    17711771        }
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