Allow disabling inline resolution on windows.

Original commit a6b25497 by xavier <xavierb@gmail.com>:

add TRACY_CALLSTACK_IGNORE_INLINES to tradeoff speed vs precision in win32 DecodeCallstackPtr()

SymQueryInlineTrace() is too slow in some cases:
300000 queries backlog getting processed at ~70 per second is prohibitive.

(without inlines resolution, it's more like ~20000 queries per second)
This commit is contained in:
Bartosz Taudul 2021-05-21 22:06:39 +02:00
parent 9eda9dc696
commit d7541bbdba
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

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