mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-17 15:54:23 +00:00
Add path to ImageEntry in prevision of replacing KernelDriver use + add DestroyImageEntry for ImageEntry cleanup
This commit is contained in:
@@ -117,6 +117,12 @@ extern "C" const char* ___tracy_demangle( const char* mangled )
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
void DestroyImageEntry( ImageEntry& entry )
|
||||
{
|
||||
tracy_free( entry.m_path );
|
||||
tracy_free( entry.m_name );
|
||||
}
|
||||
|
||||
#ifdef TRACY_USE_IMAGE_CACHE
|
||||
// when we have access to dl_iterate_phdr(), we can build a cache of address ranges to image paths
|
||||
// so we can quickly determine which image an address falls into.
|
||||
@@ -252,7 +258,7 @@ private:
|
||||
{
|
||||
for( ImageEntry& entry : m_images )
|
||||
{
|
||||
tracy_free( entry.m_name );
|
||||
DestroyImageEntry( entry );
|
||||
}
|
||||
|
||||
m_images.clear();
|
||||
|
||||
@@ -15,6 +15,7 @@ struct ImageEntry
|
||||
uint64_t m_startAddress = 0;
|
||||
uint64_t m_endAddress = 0;
|
||||
char* m_name = nullptr;
|
||||
char* m_path = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user