VirtualBox

Changeset 91704 in vbox


Ignore:
Timestamp:
Oct 13, 2021 3:41:55 AM (3 years ago)
Author:
vboxsync
Message:

add guards to STAM counters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VirtIO/VirtioCore.cpp

    r91703 r91704  
    675675        pVirtqBuf->u32Magic = ~VIRTQBUF_MAGIC;
    676676        RTMemFree(pVirtqBuf);
     677#ifdef VBOX_WITH_STATISTICS
    677678        STAM_REL_COUNTER_INC(&pVirtio->StatDescChainsFreed);
     679#endif
    678680    }
    679681    return cRefs;
     
    851853        pVirtqBuf->pSgPhysReturn = &pVirtqBuf->SgBufIn;
    852854        pVirtqBuf->cbPhysReturn  = cbIn;
     855#ifdef VBOX_WITH_STATISTICS
    853856        STAM_REL_COUNTER_ADD(&pVirtio->StatDescChainsSegsIn, cSegsIn);
     857#endif
    854858    }
    855859
     
    859863        pVirtqBuf->pSgPhysSend   = &pVirtqBuf->SgBufOut;
    860864        pVirtqBuf->cbPhysSend    = cbOut;
     865#ifdef VBOX_WITH_STATISTICS
    861866        STAM_REL_COUNTER_ADD(&pVirtio->StatDescChainsSegsOut, cSegsOut);
    862     }
    863 
     867#endif
     868    }
     869
     870#ifdef VBOX_WITH_STATISTICS
    864871    STAM_REL_COUNTER_INC(&pVirtio->StatDescChainsAllocated);
     872#endif
    865873    Log6Func(("%s -- segs OUT: %u (%u bytes)   IN: %u (%u bytes) --\n",
    866874        pVirtq->szName, cSegsOut, cbOut, cSegsIn, cbIn));
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