Thread data accessor.

This commit is contained in:
Bartosz Taudul 2019-09-08 14:07:16 +02:00
parent 3a9ff94580
commit ea6a0a58a7
2 changed files with 8 additions and 0 deletions

View File

@ -2420,6 +2420,13 @@ ThreadData* Worker::NoticeThreadReal( uint64_t thread )
}
}
const ThreadData* Worker::GetThreadData( uint64_t tid ) const
{
auto it = m_threadMap.find( tid );
if( it == m_threadMap.end() ) return nullptr;
return it->second;
}
ThreadData* Worker::NewThread( uint64_t thread )
{
CheckThreadString( thread );

View File

@ -320,6 +320,7 @@ public:
const Vector<GpuCtxData*>& GetGpuData() const { return m_data.gpuData; }
const Vector<PlotData*>& GetPlots() const { return m_data.plots.Data(); }
const Vector<ThreadData*>& GetThreadData() const { return m_data.threads; }
const ThreadData* GetThreadData( uint64_t tid ) const;
const MemData& GetMemData() const { return m_data.memory; }
const Vector<FrameImage*>& GetFrameImages() const { return m_data.frameImage; }
const Vector<StringRef>& GetAppInfo() const { return m_data.appInfo; }