mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Add debug info data structures.
This commit is contained in:
parent
bae12548c7
commit
d9fb5c71eb
@ -566,6 +566,16 @@ int cb_fixup;
|
|||||||
|
|
||||||
#ifdef TRACY_DEBUGINFOD
|
#ifdef TRACY_DEBUGINFOD
|
||||||
debuginfod_client* s_debuginfod;
|
debuginfod_client* s_debuginfod;
|
||||||
|
|
||||||
|
struct DebugInfo
|
||||||
|
{
|
||||||
|
uint8_t* buildid;
|
||||||
|
size_t buildid_size;
|
||||||
|
int fd;
|
||||||
|
};
|
||||||
|
|
||||||
|
FastVector<DebugInfo> s_di_known( 16 );
|
||||||
|
FastVector<DebugInfo> s_di_pending( 16 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
@ -675,9 +685,24 @@ void InitCallstack()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TRACY_DEBUGINFOD
|
||||||
|
void ClearDebugInfoVector( FastVector<DebugInfo>& vec )
|
||||||
|
{
|
||||||
|
for( auto& v : vec )
|
||||||
|
{
|
||||||
|
tracy_free( v.buildid );
|
||||||
|
if( v.fd >= 0 ) close( v.fd );
|
||||||
|
}
|
||||||
|
vec.clear();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void EndCallstack()
|
void EndCallstack()
|
||||||
{
|
{
|
||||||
#ifdef TRACY_DEBUGINFOD
|
#ifdef TRACY_DEBUGINFOD
|
||||||
|
ClearDebugInfoVector( s_di_known );
|
||||||
|
ClearDebugInfoVector( s_di_pending );
|
||||||
|
|
||||||
debuginfod_end( s_debuginfod );
|
debuginfod_end( s_debuginfod );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user