You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidEnterScope( const tchar *pszName, int detailLevel, const tchar *pBudgetGroupName, bool bAssertAccounted, int budgetFlags = BUDGETFLAG_OTHER );
700
+
701
+
boolInTargetThread() const { return ( m_TargetThreadId == (uint)ThreadGetCurrentId() ); } // <----- This function is fked. ThreadGetCurrentId doesn't return an uint! so comparing will break
702
+
699
703
#ifdef VPROF_VTUNE_GROUP
700
704
bool m_bVTuneGroupEnabled;
701
705
int m_nVTuneGroupID;
@@ -734,6 +738,37 @@ class PLATFORM_CLASS CCVProfile
734
738
unsigned m_TargetThreadId;
735
739
};
736
740
741
+
inlinevoidCCVProfile::EnterScope( const tchar *pszName, int detailLevel, const tchar *pBudgetGroupName, bool bAssertAccounted, int budgetFlags )
742
+
{
743
+
if ( ( m_enabled != 0 || !m_fAtRoot ) && InTargetThread() ) // if became disabled, need to unwind back to root before stopping
744
+
{
745
+
// Only account for vprof stuff on the primary thread.
0 commit comments