Disable btQuickprof.h profiling by default. We use custom profiling functions, see b3ChromeUtilsStartTimings.

This commit is contained in:
erwincoumans
2018-11-01 08:19:50 -07:00
parent 336a4b65fe
commit 750133694c
5 changed files with 30 additions and 28 deletions

View File

@@ -174,7 +174,7 @@ void MyEnterProfileZoneFunc(const char* msg)
{
if (gProfileDisabled)
return;
#ifndef BT_NO_PROFILE
int threadId = btQuickprofGetCurrentThreadIndex2();
if (threadId < 0 || threadId >= BT_QUICKPROF_MAX_THREAD_COUNT)
return;
@@ -191,13 +191,13 @@ void MyEnterProfileZoneFunc(const char* msg)
gStartTimes[threadId][gStackDepths[threadId]] = 1 + gStartTimes[threadId][gStackDepths[threadId] - 1];
}
gStackDepths[threadId]++;
#endif
}
void MyLeaveProfileZoneFunc()
{
if (gProfileDisabled)
return;
#ifndef BT_NO_PROFILE
int threadId = btQuickprofGetCurrentThreadIndex2();
if (threadId < 0 || threadId >= BT_QUICKPROF_MAX_THREAD_COUNT)
return;
@@ -214,7 +214,7 @@ void MyLeaveProfileZoneFunc()
unsigned long long int endTime = clk.getTimeNanoseconds();
gTimings[threadId].addTiming(name, threadId, startTime, endTime);
#endif //BT_NO_PROFILE
}
void b3ChromeUtilsStartTimings()