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

Expose custom memory pools in the UI.

This commit is contained in:
Bartosz Taudul
2020-09-25 17:51:05 +02:00
parent d238c97452
commit ae14e7a879
4 changed files with 67 additions and 30 deletions
+5 -2
View File
@@ -162,7 +162,7 @@ private:
void DrawLockHeader( uint32_t id, const LockMap& lockmap, const SourceLocation& srcloc, bool hover, ImDrawList* draw, const ImVec2& wpos, float w, float ty, float offset, uint8_t tid );
int DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, int offset, LockHighlight& highlight, float yMin, float yMax );
int DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, float yMin, float yMax );
void DrawPlotPoint( const ImVec2& wpos, float x, float y, int offset, uint32_t color, bool hover, bool hasPrev, const PlotItem* item, double prev, bool merged, PlotType type, PlotValueFormatting format, float PlotHeight );
void DrawPlotPoint( const ImVec2& wpos, float x, float y, int offset, uint32_t color, bool hover, bool hasPrev, const PlotItem* item, double prev, bool merged, PlotType type, PlotValueFormatting format, float PlotHeight, uint64_t name );
void DrawPlotPoint( const ImVec2& wpos, float x, float y, int offset, uint32_t color, bool hover, bool hasPrev, double val, double prev, bool merged, PlotValueFormatting format, float PlotHeight );
int DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover, float yMin, float yMax );
void DrawOptions();
@@ -186,7 +186,7 @@ private:
void DrawRanges();
void DrawRangeEntry( Range& range, const char* label, uint32_t color, const char* popupLabel, int id );
void ListMemData( std::vector<const MemEvent*>& vec, std::function<void(const MemEvent*)> DrawAddress, const char* id = nullptr, int64_t startTime = -1 );
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, PathData> GetCallstackPaths( const MemData& mem, bool onlyActive ) const;
unordered_flat_map<uint64_t, CallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
@@ -333,7 +333,9 @@ private:
uint64_t m_gpuInfoWindowThread;
uint32_t m_callstackInfoWindow = 0;
int64_t m_memoryAllocInfoWindow = -1;
uint64_t m_memoryAllocInfoPool = 0;
int64_t m_memoryAllocHover = -1;
uint64_t m_memoryAllocHoverPool = 0;
int m_memoryAllocHoverWait = 0;
const FrameData* m_frames;
uint32_t m_lockInfoWindow = InvalidId;
@@ -648,6 +650,7 @@ private:
bool show = false;
char pattern[1024] = {};
uint64_t ptrFind = 0;
uint64_t pool = 0;
bool restrictTime = false;
bool showAllocList = false;
std::vector<size_t> allocList;