VirtualBox

Changeset 71343 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Mar 15, 2018 9:09:28 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
121294
Message:

Guest Control/service: Logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r71335 r71343  
    118118    {
    119119#ifdef DEBUG_andy
    120         LogFlowFunc(("Adding reference pHostCmd=%p, CID=%RU32, new refCount=%RU32\n",
    121                      this, mContextID, mRefCount + 1));
     120        LogFlowThisFunc(("[Cmd %RU32] Adding reference, new refCount=%RU32\n", mMsgType, mRefCount + 1));
    122121#endif
    123122        return ++mRefCount;
     
    127126    {
    128127#ifdef DEBUG_andy
    129         LogFlowFunc(("Releasing reference pHostCmd=%p, CID=%RU32, new refCount=%RU32\n",
    130                      this, mContextID, mRefCount - 1));
     128        LogFlowThisFunc(("[Cmd %RU32] Releasing reference, new refCount=%RU32\n", mMsgType, mRefCount - 1));
    131129#endif
    132130        /* Release reference for current command. */
     
    148146    int Allocate(uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    149147    {
    150         LogFlowFunc(("Allocating pHostCmd=%p, uMsg=%RU32, cParms=%RU32, paParms=%p\n",
    151                      this, uMsg, cParms, paParms));
     148        LogFlowThisFunc(("[Cmd %RU32] Allocating cParms=%RU32, paParms=%p\n", uMsg, cParms, paParms));
    152149
    153150        if (!cParms) /* At least one parameter (context ID) must be present. */
     
    245242    void Free(void)
    246243    {
    247         AssertMsg(mRefCount == 0, ("pHostCmd=%p, CID=%RU32 still being used by a client (%RU32 refs), cannot free yet\n",
    248                                    this, mContextID, mRefCount));
    249 
    250         LogFlowFunc(("Freeing host command pHostCmd=%p, CID=%RU32, mMsgType=%RU32, mParmCount=%RU32, mpParms=%p\n",
    251                      this, mContextID, mMsgType, mParmCount, mpParms));
     244        AssertMsg(mRefCount == 0, ("uMsg=%RU32, CID=%RU32 still being used by a client (%RU32 refs), cannot free yet\n",
     245                                   mMsgType, mContextID, mRefCount));
     246
     247        LogFlowThisFunc(("[Cmd %RU32] Freeing\n", mMsgType));
    252248
    253249        for (uint32_t i = 0; i < mParmCount; i++)
     
    286282    int CopyTo(VBOXHGCMSVCPARM paDstParms[], uint32_t cDstParms) const
    287283    {
    288         LogFlowFunc(("pHostCmd=%p, mMsgType=%RU32, mParmCount=%RU32, mContextID=%RU32 (Session %RU32)\n",
    289                      this, mMsgType, mParmCount, mContextID, VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(mContextID)));
     284        LogFlowThisFunc(("[Cmd %RU32] mParmCount=%RU32, mContextID=%RU32 (Session %RU32)\n",
     285                         mMsgType, mParmCount, mContextID, VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(mContextID)));
    290286
    291287        int rc = VINF_SUCCESS;
     
    380376        int rc;
    381377
    382         LogFlowFunc(("pHostCmd=%p, mMsgType=%RU32, mParmCount=%RU32, mpParms=%p\n",
    383                      this, mMsgType, mParmCount, mpParms));
     378        LogFlowThisFunc(("[Cmd %RU32] mParmCount=%RU32, mpParms=%p\n", mMsgType, mParmCount, mpParms));
    384379
    385380        /* Does the current host command need more parameter space which
     
    387382        if (mParmCount > pConnection->mNumParms)
    388383        {
    389             LogFlowFunc(("pHostCmd=%p requires %RU32 parms, only got %RU32 from client\n",
    390                          this, mParmCount, pConnection->mNumParms));
    391 
     384            LogFlowThisFunc(("[Cmd %RU32] Requires %RU32 parms, only got %RU32 from client\n",
     385                             mMsgType, mParmCount, pConnection->mNumParms));
    392386            /*
    393387            * So this call apparently failed because the guest wanted to peek
     
    420414        AssertPtrReturn(pConnection, VERR_INVALID_POINTER);
    421415
    422         LogFlowFunc(("pHostCmd=%p, mMsgType=%RU32, mParmCount=%RU32, mpParms=%p\n",
    423                      this, mMsgType, mParmCount, mpParms));
     416        LogFlowThisFunc(("[Cmd %RU32] mParmCount=%RU32, mpParms=%p\n", mMsgType, mParmCount, mpParms));
    424417
    425418        if (pConnection->mNumParms >= 2)
     
    429422        }
    430423        else
    431             LogFlowFunc(("Warning: Client has not (yet) submitted enough parameters (%RU32, must be at least 2) to at least peak for the next message\n",
    432                          pConnection->mNumParms));
     424            LogFlowThisFunc(("Warning: Client has not (yet) submitted enough parameters (%RU32, must be at least 2) to at least peak for the next message\n",
     425                             pConnection->mNumParms));
    433426
    434427        /*
     
    524517        if (pHostCmd->Release() == 0)
    525518        {
    526             LogFlowFunc(("[Client %RU32] Destroying pHostCmd=%p\n",
    527                          mID, (*curItem)));
     519            LogFlowThisFunc(("[Client %RU32] Destroying command %RU32\n", mID, pHostCmd->mMsgType));
    528520
    529521            delete pHostCmd;
     
    660652
    661653        mHostCmdRc = SendReply(pConnection, pHostCmd);
    662         LogFlowFunc(("[Client %RU32] Processing pHostCmd=%p ended with rc=%Rrc\n",
    663                      mID, pHostCmd, mHostCmdRc));
     654
     655        LogFlowThisFunc(("[Client %RU32] Processing command %RU32 ended with rc=%Rrc\n", mID, pHostCmd->mMsgType, mHostCmdRc));
    664656
    665657        bool fRemove = false;
     
    695687            fRemove = true; /* Everything went fine, remove it. */
    696688
    697         LogFlowFunc(("[Client %RU32] Tried pHostCmd=%p for %RU32 times, (last result=%Rrc, fRemove=%RTbool)\n",
    698                      mID, pHostCmd, mHostCmdTries, mHostCmdRc, fRemove));
     689        LogFlowThisFunc(("[Client %RU32] Tried command %RU32 for %RU32 times, (last result=%Rrc, fRemove=%RTbool)\n",
     690                         mID, pHostCmd->mMsgType, mHostCmdTries, mHostCmdRc, fRemove));
    699691
    700692        if (RT_SUCCESS(rc)) /** @todo r=bird: confusing statement+state, rc hasn't been touched since the top and is always VINF_SUCCESS. */
     
    762754                AssertPtrReturn(pHostCmd, VERR_INVALID_POINTER);
    763755
    764                 LogFlowFunc(("[Client %RU32] Current host command is pHostCmd=%p, CID=%RU32, cmdType=%RU32, cmdParms=%RU32, refCount=%RU32\n",
    765                              mID, pHostCmd, pHostCmd->mContextID, pHostCmd->mMsgType, pHostCmd->mParmCount, pHostCmd->mRefCount));
     756                LogFlowThisFunc(("[Client %RU32] Current host command is %RU32 (CID=%RU32, cParms=%RU32, refCount=%RU32)\n",
     757                                 mID, pHostCmd->mMsgType, pHostCmd->mContextID, pHostCmd->mParmCount, pHostCmd->mRefCount));
    766758
    767759                rc = Run(&mPendingCon, pHostCmd);
     
    850842        mSvcHelpers->pfnCallComplete(pConnection->mHandle, rc);
    851843
    852         LogFlowFunc(("[Client %RU32] mPeekCount=%RU32, pConnection=%p, pHostCmd=%p, replyRc=%Rrc\n",
    853                      mID, mPeekCount, pConnection, pHostCmd, rc));
     844        LogFlowThisFunc(("[Client %RU32] Command %RU32 ended with %Rrc (mPeekCount=%RU32, pConnection=%p)\n",
     845                         mID, pHostCmd->mMsgType, rc, mPeekCount, pConnection));
    854846        return rc;
    855847    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette