1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Send host info in welcome message.

This commit is contained in:
Bartosz Taudul
2018-08-19 18:19:12 +02:00
parent 9c0e6620b3
commit bd76f4cd10
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -448,6 +448,7 @@ void Profiler::Worker()
const auto pnsz = std::min<size_t>( strlen( procname ), WelcomeMessageProgramNameSize - 1 );
const auto hostinfo = GetHostInfo();
const auto hisz = std::min<size_t>( strlen( hostinfo ), WelcomeMessageHostInfoSize - 1 );
while( m_timeBegin.load( std::memory_order_relaxed ) == 0 ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
@@ -467,6 +468,8 @@ void Profiler::Worker()
MemWrite( &welcome.onDemand, onDemand );
memcpy( welcome.programName, procname, pnsz );
memset( welcome.programName + pnsz, 0, WelcomeMessageProgramNameSize - pnsz );
memcpy( welcome.hostInfo, hostinfo, hisz );
memset( welcome.hostInfo + hisz, 0, WelcomeMessageHostInfoSize - hisz );
moodycamel::ConsumerToken token( s_queue );