mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 05:03:53 +00:00
Initialize debuginfod session.
This commit is contained in:
parent
532c5a240c
commit
8b477291f2
@ -32,6 +32,9 @@
|
|||||||
# include <cxxabi.h>
|
# include <cxxabi.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include "TracyFastVector.hpp"
|
# include "TracyFastVector.hpp"
|
||||||
|
# ifdef TRACY_DEBUGINFOD
|
||||||
|
# include <elfutils/debuginfod.h>
|
||||||
|
# endif
|
||||||
#elif TRACY_HAS_CALLSTACK == 5
|
#elif TRACY_HAS_CALLSTACK == 5
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
# include <cxxabi.h>
|
# include <cxxabi.h>
|
||||||
@ -561,6 +564,10 @@ int cb_num;
|
|||||||
CallstackEntry cb_data[MaxCbTrace];
|
CallstackEntry cb_data[MaxCbTrace];
|
||||||
int cb_fixup;
|
int cb_fixup;
|
||||||
|
|
||||||
|
#ifdef TRACY_DEBUGINFOD
|
||||||
|
debuginfod_client* s_debuginfod;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
struct KernelSymbol
|
struct KernelSymbol
|
||||||
{
|
{
|
||||||
@ -663,10 +670,16 @@ void InitCallstack()
|
|||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
InitKernelSymbols();
|
InitKernelSymbols();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef TRACY_DEBUGINFOD
|
||||||
|
s_debuginfod = debuginfod_begin();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void EndCallstack()
|
void EndCallstack()
|
||||||
{
|
{
|
||||||
|
#ifdef TRACY_DEBUGINFOD
|
||||||
|
debuginfod_end( s_debuginfod );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int FastCallstackDataCb( void* data, uintptr_t pc, uintptr_t lowaddr, const char* fn, int lineno, const char* function )
|
static int FastCallstackDataCb( void* data, uintptr_t pc, uintptr_t lowaddr, const char* fn, int lineno, const char* function )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user