VirtualBox

Ignore:
Timestamp:
Feb 19, 2008 12:33:26 PM (17 years ago)
Author:
vboxsync
Message:

Making the logging more useful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c

    r6790 r7014  
    3939#include <iprt/process.h>
    4040#include <iprt/log.h>
     41
     42/*
     43 * Logging assignments:
     44 *      Log     - useful stuff, like failures.
     45 *      LogFlow - program flow, except the really noisy bits.
     46 *      Log2    - Cleanup and IDTE
     47 *      Log3    - Loader flow noise.
     48 *      Log4    - Call VMMR0 flow noise.
     49 *      Log5    - Native yet-to-be-defined noise.
     50 *      Log6    - Native ioctl flow noise.
     51 *
     52 * Logging requires BUILD_TYPE=debug and possibly changes to the logger
     53 * instanciation in log-vbox.c(pp).
     54 */
    4155
    4256
     
    461475                RTSpinlockRelease(pDevExt->Spinlock, &SpinlockTmp);
    462476
     477                Log(("supdrvCleanupSession: destroying %p/%d (%p/%p) cpid=%RTproc pid=%RTproc dtor=%p\n",
     478                     pObj, pObj->enmType, pObj->pvUser1, pObj->pvUser2, pObj->CreatorProcess, RTProcSelf(), pObj->pfnDestructor));
    463479                if (pObj->pfnDestructor)
    464480                    pObj->pfnDestructor(pObj, pObj->pvUser1, pObj->pvUser2);
     
    951967            /* validate */
    952968            PSUPCALLVMMR0 pReq = (PSUPCALLVMMR0)pReqHdr;
     969            Log4(("SUP_IOCTL_CALL_VMMR0: op=%u in=%u arg=%RX64 p/t=%RTproc/%RTthrd\n",
     970                  pReq->u.In.uOperation, pReq->Hdr.cbIn, pReq->u.In.u64Arg, RTProcSelf(), RTThreadNativeSelf()));
     971
    953972            if (pReq->Hdr.cbIn == SUP_IOCTL_CALL_VMMR0_SIZE(0))
    954973            {
     
    975994                    pReq->Hdr.rc = VERR_WRONG_ORDER;
    976995            }
     996
     997            if (    RT_FAILURE(pReq->Hdr.rc)
     998                &&  pReq->Hdr.rc != VERR_INTERRUPTED
     999                &&  pReq->Hdr.rc != VERR_TIMEOUT)
     1000                Log(("SUP_IOCTL_CALL_VMMR0: rc=%Rrc op=%u out=%u arg=%RX64 p/t=%RTproc/%RTthrd\n",
     1001                     pReq->Hdr.rc, pReq->u.In.uOperation, pReq->Hdr.cbOut, pReq->u.In.u64Arg, RTProcSelf(), RTThreadNativeSelf()));
     1002            else
     1003                Log4(("SUP_IOCTL_CALL_VMMR0: rc=%Rrc op=%u out=%u arg=%RX64 p/t=%RTproc/%RTthrd\n",
     1004                      pReq->Hdr.rc, pReq->u.In.uOperation, pReq->Hdr.cbOut, pReq->u.In.u64Arg, RTProcSelf(), RTThreadNativeSelf()));
    9771005            return 0;
    9781006        }
     
    13201348                     * Object is to be destroyed, unlink it.
    13211349                     */
     1350                    pObj->u32Magic = SUPDRVOBJ_MAGIC + 1;
    13221351                    fDestroy = true;
    13231352                    if (pDevExt->pObjs == pObj)
     
    13471376    if (fDestroy)
    13481377    {
    1349         pObj->u32Magic++;
     1378        Log(("SUPR0ObjRelease: destroying %p/%d (%p/%p) cpid=%RTproc pid=%RTproc dtor=%p\n",
     1379             pObj, pObj->enmType, pObj->pvUser1, pObj->pvUser2, pObj->CreatorProcess, RTProcSelf(), pObj->pfnDestructor));
    13501380        if (pObj->pfnDestructor)
    13511381            pObj->pfnDestructor(pObj, pObj->pvUser1, pObj->pvUser2);
     
    32443274                pImage->cUsage--;
    32453275        }
     3276        else
     3277            Log(("supdrvIOCtl_LdrFree: Dangling objects in %p/%s!\n", pImage->pvImage, pImage->szName));
    32463278    }
    32473279    else
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