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

"Find Zone" feature

- Simple text search with some limiting options
 - Grouping by threads
 - Easy access to "Zone Info" from search results
This commit is contained in:
Kamil Klimek
2018-01-17 12:49:50 +01:00
parent 142f94cc33
commit cb08990eff
2 changed files with 137 additions and 0 deletions
+14
View File
@@ -134,6 +134,8 @@ private:
const char* ShortenNamespace( const char* name ) const;
void DrawHelpMarker( const char* desc ) const;
void DrawTextContrast( ImDrawList* draw, const ImVec2& pos, uint32_t color, const char* text );
void DrawImpl();
@@ -148,6 +150,7 @@ private:
void DrawPlotPoint( const ImVec2& wpos, float x, float y, int offset, uint32_t color, bool hover, bool hasPrev, double val, double prev, bool merged );
void DrawOptions();
void DrawMessages();
void DrawFindZone();
void DrawInfoWindow();
void DrawZoneInfoWindow();
@@ -171,6 +174,9 @@ private:
const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const;
const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;
void FindZones();
void FindZones( const Vector<ZoneEvent*> &events, Vector<ZoneEvent*> &out, const int maxdepth = 0 );
void Write( FileWrite& f );
void WriteTimeline( FileWrite& f, const Vector<ZoneEvent*>& vec );
void WriteTimeline( FileWrite& f, const Vector<GpuEvent*>& vec );
@@ -276,6 +282,14 @@ private:
Namespace m_namespace;
Animation m_zoomAnim;
struct {
bool show;
std::vector<std::unique_ptr<ThreadData>> result;
char pattern[1024] = { "" };
int maxZonesPerThread = 1000;
int maxDepth = 10;
} m_findZone;
bool m_terminate;
};