VirtualBox

Changeset 55980 in vbox for trunk/src/VBox/VMM/VMMR3/VMM.cpp


Ignore:
Timestamp:
May 20, 2015 5:35:22 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100489
Message:

iprt/log.h,++: Added extended logger instance getters that also checks whether the given logger and group-flags are enabled, making the LogRel* checks more efficient in avoid uncessary RTLogLoggerEx parameter building and calls. Ditto for debug logging. The LOG_INSTANCE and LOG_REL_INSTANCE tricks are gone for now.

File:
1 edited

Legend:

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

    r55863 r55980  
    382382    if (!HMIsEnabled(pVM))
    383383    {
    384         PRTLOGGER pRelLogger = RTLogRelDefaultInstance();
     384        PRTLOGGER pRelLogger = RTLogRelGetDefaultInstance();
    385385        if (pRelLogger)
    386386        {
     
    608608            PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    609609            if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    610                 RTLogFlushRC(RTLogRelDefaultInstance(), pRelLogger);
     610                RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    611611#endif
    612612            if (rc != VINF_VMM_CALL_HOST)
     
    917917
    918918        pVM->vmm.s.pRCRelLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCRelLoggerR3);
    919         rc = RTLogCloneRC(RTLogRelDefaultInstance(), pVM->vmm.s.pRCRelLoggerR3, pVM->vmm.s.cbRCRelLogger,
     919        rc = RTLogCloneRC(RTLogRelGetDefaultInstance(), pVM->vmm.s.pRCRelLoggerR3, pVM->vmm.s.cbRCRelLogger,
    920920                          RCPtrLoggerWrapper, RCPtrLoggerFlush, RTLOGFLAGS_BUFFERED);
    921921        AssertReleaseMsgRC(rc, ("RTLogCloneRC failed! rc=%Rra\n", rc));
     
    13191319        PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    13201320        if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    1321             RTLogFlushRC(RTLogRelDefaultInstance(), pRelLogger);
     1321            RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    13221322#endif
    13231323        if (rc != VINF_VMM_CALL_HOST)
     
    20052005        PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    20062006        if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    2007             RTLogFlushRC(RTLogRelDefaultInstance(), pRelLogger);
     2007            RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    20082008#endif
    20092009        if (rc == VERR_TRPM_PANIC || rc == VERR_TRPM_DONT_PANIC)
     
    21152115        PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    21162116        if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    2117             RTLogFlushRC(RTLogRelDefaultInstance(), pRelLogger);
     2117            RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    21182118# endif
    21192119        if (rc == VERR_TRPM_PANIC || rc == VERR_TRPM_DONT_PANIC)
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