Send on-demand status in welcome message.

This commit is contained in:
Bartosz Taudul 2018-07-10 21:44:23 +02:00
parent c056f3be41
commit 010b19946f
2 changed files with 8 additions and 0 deletions

View File

@ -257,6 +257,12 @@ void Profiler::Worker()
while( m_timeBegin.load( std::memory_order_relaxed ) == 0 ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
#ifdef TRACY_ON_DEMAND
uint8_t onDemand = 1;
#else
uint8_t onDemand = 0;
#endif
WelcomeMessage welcome;
MemWrite( &welcome.timerMul, m_timerMul );
MemWrite( &welcome.initBegin, s_initTime.val );
@ -264,6 +270,7 @@ void Profiler::Worker()
MemWrite( &welcome.delay, m_delay );
MemWrite( &welcome.resolution, m_resolution );
MemWrite( &welcome.epoch, m_epoch );
MemWrite( &welcome.onDemand, onDemand );
memcpy( welcome.programName, procname, pnsz );
memset( welcome.programName + pnsz, 0, WelcomeMessageProgramNameSize - pnsz );

View File

@ -36,6 +36,7 @@ struct WelcomeMessage
uint64_t delay;
uint64_t resolution;
uint64_t epoch;
uint8_t onDemand;
char programName[WelcomeMessageProgramNameSize];
};