diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index f29e36fd..1856a06e 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -405,6 +405,13 @@ std::vector Worker::GetMatchingSourceLocation( const char* query ) cons return match; } +const Vector& Worker::GetZonesForSourceLocation( int32_t srcloc ) const +{ + static const Vector empty; + auto it = m_data.sourceLocationZones.find( srcloc ); + return it != m_data.sourceLocationZones.end() ? it->second : empty; +} + void Worker::Exec() { timeval tv; diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 72ad355a..687d645c 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -103,6 +103,7 @@ public: const SourceLocation& GetSourceLocation( int32_t srcloc ) const; std::vector GetMatchingSourceLocation( const char* query ) const; + const Vector& GetZonesForSourceLocation( int32_t srcloc ) const; NonRecursiveBenaphore& GetMbpsDataLock() { return m_mbpsData.lock; } const std::vector& GetMbpsData() const { return m_mbpsData.mbps; }