VirtualBox

Ignore:
Timestamp:
May 20, 2015 5:35:22 PM (10 years ago)
Author:
vboxsync
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.

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku-stubs.c

    r54608 r55980  
    331331    return g_VBoxGuest->_RTLogDefaultInstance();
    332332}
    333 RTDECL(PRTLOGGER) RTLogRelDefaultInstance(void)
    334 {
    335     return g_VBoxGuest->_RTLogRelDefaultInstance();
     333RTDECL(PRTLOGGER) RTLogDefaultInstanceEx(uint32_t fFlags, uint32_t iGroup)
     334{
     335    return g_VBoxGuest->_RTLogDefaultInstanceEx(fFlags, iGroup);
     336}
     337RTDECL(PRTLOGGER) RTLogRelGetDefaultInstance(void)
     338{
     339    return g_VBoxGuest->_RTLogRelGetDefaultInstance();
     340}
     341RTDECL(PRTLOGGER) RTLogRelGetDefaultInstance(uint32_t fFlags, uint32_t iGroup)
     342{
     343    return g_VBoxGuest->_RTLogRelGetDefaultInstanceEx(fFlags, iGroup);
    336344}
    337345RTDECL(int) RTErrConvertToErrno(int iErr)
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c

    r54608 r55980  
    177177    RTMemTmpFree,
    178178    RTLogDefaultInstance,
    179     RTLogRelDefaultInstance,
     179    RTLogDefaultInstanceEx,
     180    RTLogRelGetDefaultInstance,
     181    RTLogRelGetDefaultInstanceEx,
    180182    RTErrConvertToErrno,
    181183    VbgdCommonIoCtl,
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.h

    r54608 r55980  
    180180    void (*_RTMemTmpFree)(void *pv);
    181181    PRTLOGGER(*_RTLogDefaultInstance)(void);
    182     PRTLOGGER(*_RTLogRelDefaultInstance)(void);
     182    PRTLOGGER(*_RTLogDefaultInstanceEx)(uint32_t fFlags, uint32_t iGroup);
     183    PRTLOGGER(*_RTLogRelGetDefaultInstance)(void);
     184    PRTLOGGER(*_RTLogRelGetDefaultInstanceEx)(uint32_t fFlags, uint32_t iGroup);
    183185    int (*_RTErrConvertToErrno)(int iErr);
    184186    int (*_VbgdCommonIoCtl)(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession,
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r54610 r55980  
    957957    if (g_fLoggerCreated)
    958958    {
    959         PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelDefaultInstance();
     959        PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
    960960        if (pLogger)
    961961            RTLogGroupSettings(pLogger, pszValue);
     
    970970static int vboxguestLinuxParamLogGrpGet(char *pszBuf, struct kernel_param *pParam)
    971971{
    972     PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelDefaultInstance();
     972    PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
    973973    *pszBuf = '\0';
    974974    if (pLogger)
     
    983983    if (g_fLoggerCreated)
    984984    {
    985         PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelDefaultInstance();
     985        PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
    986986        if (pLogger)
    987987            RTLogFlags(pLogger, pszValue);
     
    995995static int vboxguestLinuxParamLogFlagsGet(char *pszBuf, struct kernel_param *pParam)
    996996{
    997     PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelDefaultInstance();
     997    PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
    998998    *pszBuf = '\0';
    999999    if (pLogger)
     
    10081008    if (g_fLoggerCreated)
    10091009    {
    1010         PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelDefaultInstance();
     1010        PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
    10111011        if (pLogger)
    10121012            RTLogDestinations(pLogger, pszValue);
     
    10201020static int vboxguestLinuxParamLogDstGet(char *pszBuf, struct kernel_param *pParam)
    10211021{
    1022     PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelDefaultInstance();
     1022    PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance();
    10231023    *pszBuf = '\0';
    10241024    if (pLogger)
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