VirtualBox

Ignore:
Timestamp:
Oct 5, 2016 1:43:52 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111134
Message:

bugref:8614: Additions/common/VBoxVideo: make the code more self-contained: disable all logging statements (comment them out, do not remove them) so as not to pull in the logging sub-system. Added a note suggesting that we give callers the information they need to do any logging.

Location:
trunk/src/VBox/Additions/common/VBoxVideo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp

    r63273 r64156  
    2424
    2525#include <iprt/asm.h>
    26 #include <iprt/log.h>
     26// #include <iprt/log.h>
    2727#include <iprt/string.h>
    2828
     
    411411    *pcbHostArea = cbHostArea;
    412412    *poffVRAMHostArea = offVRAMHostArea;
    413     LogFunc(("offVRAMHostArea = 0x%08X, cbHostArea = 0x%08X\n",
    414              offVRAMHostArea, cbHostArea));
     413    // LogFunc(("offVRAMHostArea = 0x%08X, cbHostArea = 0x%08X\n",
     414    //          offVRAMHostArea, cbHostArea));
    415415}
    416416
     
    462462                                         uint32_t cbHostArea)
    463463{
    464     Log(("VBoxVideo::vboxSetupAdapterInfo\n"));
     464    // Log(("VBoxVideo::vboxSetupAdapterInfo\n"));
    465465
    466466    /* setup the flags first to ensure they are initialized by the time the
     
    480480        AssertRC(rc);
    481481    }
    482     Log(("VBoxVideo::vboxSetupAdapterInfo finished rc = %d\n", rc));
     482    // Log(("VBoxVideo::vboxSetupAdapterInfo finished rc = %d\n", rc));
    483483    return rc;
    484484}
     
    519519    int rc = VINF_SUCCESS;
    520520    VBVACONF32 *p;
    521     LogFunc(("u32Index = %d\n", u32Index));
     521    // LogFunc(("u32Index = %d\n", u32Index));
    522522
    523523    rc = testQueryConf(pCtx);
     
    537537        {
    538538            *pulValue = p->u32Value;
    539             LogFunc(("u32Value = %d\n", p->u32Value));
     539            // LogFunc(("u32Value = %d\n", p->u32Value));
    540540        }
    541541        /* Free the IO buffer. */
     
    544544    else
    545545        rc = VERR_NO_MEMORY;
    546     LogFunc(("rc = %d\n", rc));
     546    // LogFunc(("rc = %d\n", rc));
    547547    return rc;
    548548}
     
    589589        fFlags |= VBOX_MOUSE_POINTER_VISIBLE;
    590590    }
    591     LogFlowFunc(("cbData %d, %dx%d\n", cbData, cWidth, cHeight));
     591    // LogFlowFunc(("cbData %d, %dx%d\n", cbData, cWidth, cHeight));
    592592    if (cbData > cbLength)
    593593    {
    594         LogFunc(("calculated pointer data size is too big (%d bytes, limit %d)\n",
    595                  cbData, cbLength));
     594        // LogFunc(("calculated pointer data size is too big (%d bytes, limit %d)\n",
     595        //          cbData, cbLength));
    596596        return VERR_INVALID_PARAMETER;
    597597    }
     
    624624    else
    625625        rc = VERR_NO_MEMORY;
    626     LogFlowFunc(("rc %d\n", rc));
     626    // LogFlowFunc(("rc %d\n", rc));
    627627    return rc;
    628628}
     
    647647    int rc = VINF_SUCCESS;
    648648    VBVACURSORPOSITION *p;
    649     Log(("%s: x=%u, y=%u\n", __PRETTY_FUNCTION__, (unsigned)x, (unsigned)y));
     649    // Log(("%s: x=%u, y=%u\n", __PRETTY_FUNCTION__, (unsigned)x, (unsigned)y));
    650650
    651651    /* Allocate the IO buffer. */
     
    664664            if (pyHost)
    665665                *pyHost = p->y;
    666             Log(("%s: return: x=%u, y=%u\n", __PRETTY_FUNCTION__, (unsigned)p->x, (unsigned)p->y));
     666            // Log(("%s: return: x=%u, y=%u\n", __PRETTY_FUNCTION__, (unsigned)p->x, (unsigned)p->y));
    667667        }
    668668        /* Free the IO buffer. */
     
    671671    else
    672672        rc = VERR_NO_MEMORY;
    673     LogFunc(("rc = %d\n", rc));
     673    // LogFunc(("rc = %d\n", rc));
    674674    return rc;
    675675}
  • trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp

    r63273 r64156  
    2424
    2525#include <iprt/asm.h>
    26 #include <iprt/log.h>
     26// #include <iprt/log.h>
    2727
    2828#ifndef VBOX_GUESTR3XF86MOD
     
    4242    uint32_t cDisplays = 0;
    4343    VBoxQueryConfHGSMI(pCtx, VBOX_VBVA_CONF32_MONITOR_COUNT, &cDisplays);
    44     LogFunc(("cDisplays = %d\n", cDisplays));
     44    // LogFunc(("cDisplays = %d\n", cDisplays));
    4545    if (cDisplays == 0 || cDisplays > VBOX_VIDEO_MAX_SCREENS)
    4646        /* Host reported some bad value. Continue in the 1 screen mode. */
     
    258258    if (!p)
    259259    {
    260         LogFunc(("HGSMIHeapAlloc failed\n"));
     260        // LogFunc(("HGSMIHeapAlloc failed\n"));
    261261    }
    262262    else
     
    298298    int rc = VINF_SUCCESS;
    299299    VBVAREPORTINPUTMAPPING *p;
    300     Log(("%s: cOriginX=%d, cOriginY=%d, cWidth=%u, cHeight=%u\n", __PRETTY_FUNCTION__, (int)cOriginX, (int)cOriginX,
    301          (unsigned)cWidth, (unsigned)cHeight));
     300    // Log(("%s: cOriginX=%d, cOriginY=%d, cWidth=%u, cHeight=%u\n", __PRETTY_FUNCTION__, (int)cOriginX, (int)cOriginX,
     301    //      (unsigned)cWidth, (unsigned)cHeight));
    302302
    303303    /* Allocate the IO buffer. */
     
    317317    else
    318318        rc = VERR_NO_MEMORY;
    319     LogFunc(("rc = %d\n", rc));
     319    // LogFunc(("rc = %d\n", rc));
    320320    return rc;
    321321}
     
    341341    if (!p)
    342342    {
    343         LogFunc(("HGSMIHeapAlloc failed\n"));
     343        // LogFunc(("HGSMIHeapAlloc failed\n"));
    344344        return VERR_NO_MEMORY;
    345345    }
     
    374374    uint32_t u32Flags = 0;
    375375    int rc = VBoxQueryConfHGSMIDef(pCtx, VBOX_VBVA_CONF32_SCREEN_FLAGS, 0, &u32Flags);
    376     LogFunc(("u32Flags = 0x%x rc %Rrc\n", u32Flags, rc));
     376    // LogFunc(("u32Flags = 0x%x rc %Rrc\n", u32Flags, rc));
    377377    if (RT_FAILURE(rc))
    378378        u32Flags = 0;
  • trunk/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp

    r63273 r64156  
    2020#include <VBox/VBoxVideo.h>
    2121#include <VBox/err.h>
    22 #include <VBox/log.h>
     22// #include <VBox/log.h>
    2323#include <iprt/assert.h>
    2424#include <iprt/string.h>
     
    6262        if (!p)
    6363        {
    64             LogFunc(("HGSMIHeapAlloc failed\n"));
     64            // LogFunc(("HGSMIHeapAlloc failed\n"));
    6565        }
    6666        else
     
    104104    bool bRc = false;
    105105
    106     LogFlowFunc(("pVBVA %p\n", pVBVA));
     106    // LogFlowFunc(("pVBVA %p\n", pVBVA));
    107107
    108108#if 0  /* All callers check this */
     
    110110#endif
    111111    {
    112         LogFunc(("pVBVA %p vbva off 0x%x\n", pVBVA, pCtx->offVRAMBuffer));
     112        // LogFunc(("pVBVA %p vbva off 0x%x\n", pVBVA, pCtx->offVRAMBuffer));
    113113
    114114        pVBVA->hostFlags.u32HostEvents      = 0;
     
    141141                                 int32_t cScreen)
    142142{
    143     LogFlowFunc(("\n"));
     143    // LogFlowFunc(("\n"));
    144144
    145145    pCtx->fHwBufferOverflow = false;
     
    178178        {
    179179            /* Even after flush there is no place. Fail the request. */
    180             LogFunc(("no space in the queue of records!!! first %d, last %d\n",
    181                      pCtx->pVBVA->indexRecordFirst, pCtx->pVBVA->indexRecordFree));
     180            // LogFunc(("no space in the queue of records!!! first %d, last %d\n",
     181            //          pCtx->pVBVA->indexRecordFirst, pCtx->pVBVA->indexRecordFree));
    182182        }
    183183        else
     
    241241    if (!p)
    242242    {
    243         LogFunc(("HGSMIHeapAlloc failed\n"));
     243        // LogFunc(("HGSMIHeapAlloc failed\n"));
    244244    }
    245245    else
     
    315315        if (cbChunk >= cbHwBufferAvail)
    316316        {
    317             LogFunc(("1) avail %d, chunk %d\n", cbHwBufferAvail, cbChunk));
     317            // LogFunc(("1) avail %d, chunk %d\n", cbHwBufferAvail, cbChunk));
    318318
    319319            vboxHwBufferFlush (pHGSMICtx);
     
    323323            if (cbChunk >= cbHwBufferAvail)
    324324            {
    325                 LogFunc(("no place for %d bytes. Only %d bytes available after flush. Going to partial writes.\n",
    326                             cb, cbHwBufferAvail));
     325                // LogFunc(("no place for %d bytes. Only %d bytes available after flush. Going to partial writes.\n",
     326                //             cb, cbHwBufferAvail));
    327327
    328328                if (cbHwBufferAvail <= pVBVA->cbPartialWriteThreshold)
    329329                {
    330                     LogFunc(("Buffer overflow!!!\n"));
     330                    // LogFunc(("Buffer overflow!!!\n"));
    331331                    pCtx->fHwBufferOverflow = true;
    332332                    Assert(false);
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