VirtualBox

Ignore:
Timestamp:
Jul 5, 2012 3:22:12 PM (13 years ago)
Author:
vboxsync
Message:

wddm: fix release profiling

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp

    r41637 r42027  
    8181}
    8282
     83#if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE)
     84LONG g_VBoxVDbgFIsDwm = -1;
     85
     86DWORD g_VBoxVDbgPid = 0;
     87#endif
     88
    8389#ifdef VBOXWDDMDISP_DEBUG
    8490#define VBOXWDDMDISP_DEBUG_DUMP_DEFAULT 0
     
    109115DWORD g_VBoxVDbgFLog = 1;
    110116DWORD g_VBoxVDbgFLogFlow = 0;
    111 
    112 LONG g_VBoxVDbgFIsDwm = -1;
    113 
    114 DWORD g_VBoxVDbgPid = 0;
    115117
    116118DWORD g_VBoxVDbgCfgMaxDirectRts = 0;
     
    642644}
    643645
    644 BOOL vboxVDbgDoCheckExe(const char * pszName)
    645 {
    646     char *pszModule = vboxVDbgDoGetModuleName();
    647     if (!pszModule)
    648         return FALSE;
    649     DWORD cbModule, cbName;
    650     cbModule = strlen(pszModule);
    651     cbName = strlen(pszName);
    652     if (cbName > cbModule)
    653         return FALSE;
    654     if (_stricmp(pszName, pszModule + (cbModule - cbName)))
    655         return FALSE;
    656     return TRUE;
    657 }
    658 
    659646static VOID CALLBACK vboxVDbgTimerCb(__in PVOID lpParameter, __in BOOLEAN TimerOrWaitFired)
    660647{
     
    686673    }
    687674    return S_OK;
     675}
     676#endif
     677
     678#if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE)
     679BOOL vboxVDbgDoCheckExe(const char * pszName)
     680{
     681    char *pszModule = vboxVDbgDoGetModuleName();
     682    if (!pszModule)
     683        return FALSE;
     684    DWORD cbModule, cbName;
     685    cbModule = strlen(pszModule);
     686    cbName = strlen(pszName);
     687    if (cbName > cbModule)
     688        return FALSE;
     689    if (_stricmp(pszName, pszModule + (cbModule - cbName)))
     690        return FALSE;
     691    return TRUE;
    688692}
    689693#endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h

    r41637 r42027  
    7979extern DWORD g_VBoxVDbgFLogFlow;
    8080
    81 extern LONG g_VBoxVDbgFIsDwm;
    82 
    8381extern DWORD g_VBoxVDbgCfgMaxDirectRts;
    8482extern DWORD g_VBoxVDbgCfgForceDummyDevCreate;
     
    170168    } while (0)
    171169
     170#if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE)
     171extern DWORD g_VBoxVDbgPid;
     172extern LONG g_VBoxVDbgFIsDwm;
     173#define VBOXVDBG_CHECK_EXE(_pszName) (vboxVDbgDoCheckExe(_pszName))
     174#define VBOXVDBG_IS_DWM() (!!(g_VBoxVDbgFIsDwm >=0 ? g_VBoxVDbgFIsDwm : (g_VBoxVDbgFIsDwm = VBOXVDBG_CHECK_EXE("dwm.exe"))))
     175BOOL vboxVDbgDoCheckExe(const char * pszName);
     176#endif
    172177#if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV)
    173178
     
    259264                            BOOL fBreakOnMismatch);
    260265
    261 BOOL vboxVDbgDoCheckExe(const char * pszName);
    262 
    263266VOID vboxVDbgDoPrintLopLastCmd(const char* pszDesc);
    264267
     
    266269HRESULT vboxVDbgTimerStop(HANDLE hTimerQueue, HANDLE hTimer);
    267270
    268 extern DWORD g_VBoxVDbgPid;
    269271#define VBOXVDBG_IS_PID(_pid) ((_pid) == (g_VBoxVDbgPid ? g_VBoxVDbgPid : (g_VBoxVDbgPid = GetCurrentProcessId())))
    270272#define VBOXVDBG_IS_DUMP_ALLOWED_PID(_pid) (((int)(_pid)) > 0 ? VBOXVDBG_IS_PID(_pid) : !VBOXVDBG_IS_PID(-((int)(_pid))))
    271 
    272 #define VBOXVDBG_CHECK_EXE(_pszName) (vboxVDbgDoCheckExe(_pszName))
    273 #define VBOXVDBG_IS_DWM() (!!(g_VBoxVDbgFIsDwm >=0 ? g_VBoxVDbgFIsDwm : (g_VBoxVDbgFIsDwm = VBOXVDBG_CHECK_EXE("dwm.exe"))))
    274273
    275274#define VBOXVDBG_ASSERT_IS_DWM(_bDwm) do { \
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