Merge remote-tracking branch 'origin/master' into hw

This commit is contained in:
Bartosz Taudul 2021-05-22 02:05:47 +02:00
commit fef507dfa2
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
4 changed files with 19 additions and 5 deletions

8
NEWS
View File

@ -3,6 +3,14 @@ be able to talk with each other. Network protocol breakages won't be listed
here.
v0.x.x (xxxx-xx-xx)
-------------------
- Added TRACY_NO_CALLSTACK_INLINES macro to disable inline functions
resolution in call stacks on Windows.
- Limited client query response rate.
v0.7.8 (2021-05-19)
-------------------

View File

@ -292,7 +292,7 @@ CallstackSymbolData DecodeCodeAddress( uint64_t ptr )
#ifdef TRACY_DBGHELP_LOCK
DBGHELP_LOCK;
#endif
#ifndef __CYGWIN__
#if !defined __CYGWIN__ && !defined TRACY_NO_CALLSTACK_INLINES
DWORD inlineNum = SymAddrIncludeInlineTrace( proc, ptr );
DWORD ctx = 0;
DWORD idx;
@ -335,7 +335,7 @@ CallstackEntryData DecodeCallstackPtr( uint64_t ptr )
#ifdef TRACY_DBGHELP_LOCK
DBGHELP_LOCK;
#endif
#ifndef __CYGWIN__
#if !defined __CYGWIN__ && !defined TRACY_NO_CALLSTACK_INLINES
DWORD inlineNum = SymAddrIncludeInlineTrace( proc, ptr );
if( inlineNum > MaxCbTrace - 1 ) inlineNum = MaxCbTrace - 1;
DWORD ctx = 0;
@ -393,7 +393,7 @@ CallstackEntryData DecodeCallstackPtr( uint64_t ptr )
}
}
#ifndef __CYGWIN__
#if !defined __CYGWIN__ && !defined TRACY_NO_CALLSTACK_INLINES
if( doInline )
{
for( DWORD i=0; i<inlineNum; i++ )

View File

@ -1676,7 +1676,7 @@ void Profiler::Worker()
keepAlive = 0;
}
else
else if( !m_sock->HasData() )
{
keepAlive++;
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
@ -1687,10 +1687,12 @@ void Profiler::Worker()
keepAlive = 0;
}
int quota = 500;
bool connActive = true;
while( m_sock->HasData() && connActive )
while( quota-- && m_sock->HasData() )
{
connActive = HandleServerQuery();
if( !connActive ) break;
}
if( !connActive ) break;
}

View File

@ -1531,6 +1531,10 @@ void DbgHelpUnlock() { ReleaseMutex(dbgHelpLock); }
}
\end{lstlisting}
\paragraph{Disabling resolution of inline frames}
Inline frames retrieval on Windows can be multiple orders of magnitude slower than just performing basic symbol resolution. This is being manifested as profiler seemingly being stuck for a long time, having hundred thousands of query backlog entries queued, which are slowly trickling down. If your use case requires speed of operation rather than having call stacks with inline frames included, you may define the \texttt{TRACY\_NO\_CALLSTACK\_INLINES} macro, which will make the profiler stick to the basic but fast frame resolution mode.
\subsection{Lua support}
To profile Lua code using Tracy, include the \texttt{tracy/TracyLua.hpp} header file in your Lua wrapper and execute \texttt{tracy::LuaRegister(lua\_State*)} function to add instrumentation support.