mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Merge branch 'trodrigues/tracy_libunwind' of https://github.com/tiago-rodrigues/tracy into trodrigues/tracy_libunwind
This commit is contained in:
commit
0339ed3c9c
@ -84,6 +84,7 @@ set_option(TRACY_MANUAL_LIFETIME "Enable the manual lifetime management of the p
|
||||
set_option(TRACY_FIBERS "Enable fibers support" OFF)
|
||||
set_option(TRACY_NO_CRASH_HANDLER "Disable crash handling" OFF)
|
||||
set_option(TRACY_TIMER_FALLBACK "Use lower resolution timers" OFF)
|
||||
set_option(TRACE_CLIENT_LIBUNWIND_BACKTRACE "Use libunwind backtracing where supported" OFF)
|
||||
|
||||
if(NOT TRACY_STATIC)
|
||||
target_compile_definitions(TracyClient PRIVATE TRACY_EXPORTS)
|
||||
|
@ -8,7 +8,7 @@
|
||||
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 5
|
||||
# include <unwind.h>
|
||||
#elif TRACY_HAS_CALLSTACK >= 3
|
||||
#ifdef USE_LIB_UNWIND_BACKTRACE
|
||||
#ifdef TRACE_CLIENT_LIBUNWIND_BACKTRACE
|
||||
// libunwind is in general significantly faster than execinfo based backtraces
|
||||
#define UNW_LOCAL_ONLY
|
||||
# include <libunwind.h>
|
||||
@ -134,7 +134,7 @@ static tracy_force_inline void* Callstack( int depth )
|
||||
|
||||
auto trace = (uintptr_t*)tracy_malloc( ( 1 + (size_t)depth ) * sizeof( uintptr_t ) );
|
||||
|
||||
#ifdef USE_LIB_UNWIND_BACKTRACE
|
||||
#ifdef TRACE_CLIENT_LIBUNWIND_BACKTRACE
|
||||
size_t num = unw_backtrace( (void**)(trace+1), depth );
|
||||
#else
|
||||
const auto num = (size_t)backtrace( (void**)(trace+1), depth );
|
||||
|
Loading…
Reference in New Issue
Block a user