1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add ability to filter callstacks in memory tab by inactive allocations.

Filtering by inactive allocations helps to pin point wasteful allocations
in an app.
This commit is contained in:
thedmd
2022-06-01 08:45:26 +02:00
parent a53c8befdc
commit 9ed9e18bc8
3 changed files with 36 additions and 13 deletions
+10 -3
View File
@@ -147,6 +147,13 @@ private:
LastRange
};
enum class MemRange
{
Full,
Active,
Inactive
};
struct ZoneColorData
{
uint32_t color;
@@ -227,7 +234,7 @@ private:
void ListMemData( std::vector<const MemEvent*>& vec, std::function<void(const MemEvent*)> DrawAddress, const char* id = nullptr, int64_t startTime = -1, uint64_t pool = 0 );
unordered_flat_map<uint32_t, MemPathData> GetCallstackPaths( const MemData& mem, bool onlyActive ) const;
unordered_flat_map<uint32_t, MemPathData> GetCallstackPaths( const MemData& mem, MemRange memRange ) const;
unordered_flat_map<uint64_t, MemCallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
unordered_flat_map<uint64_t, MemCallstackFrameTree> GetCallstackFrameTreeTopDown( const MemData& mem ) const;
void DrawFrameTreeLevel( const unordered_flat_map<uint64_t, MemCallstackFrameTree>& tree, int& idx );
@@ -494,8 +501,8 @@ private:
bool m_groupCallstackTreeByNameBottomUp = true;
bool m_groupCallstackTreeByNameTopDown = true;
bool m_activeOnlyBottomUp = false;
bool m_activeOnlyTopDown = false;
MemRange m_memRangeBottomUp = MemRange::Full;
MemRange m_memRangeTopDown = MemRange::Full;
enum class SaveThreadState
{