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

Allow filtering messages by thread.

This commit is contained in:
Bartosz Taudul
2018-08-18 19:57:36 +02:00
parent 59293b1850
commit a4df805746
2 changed files with 71 additions and 20 deletions
+11
View File
@@ -151,6 +151,7 @@ private:
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx );
flat_hash_map<const void*, bool, nohash<const void*>> m_visible;
flat_hash_map<uint64_t, bool, nohash<uint64_t>> m_visibleMsgThread;
flat_hash_map<const void*, bool, nohash<const void*>> m_showFull;
flat_hash_map<const void*, int, nohash<const void*>> m_gpuDrift;
@@ -164,6 +165,16 @@ private:
return it->second;
}
tracy_force_inline bool& VisibleMsgThread( uint64_t thread )
{
auto it = m_visibleMsgThread.find( thread );
if( it == m_visibleMsgThread.end() )
{
it = m_visibleMsgThread.emplace( thread, true ).first;
}
return it->second;
}
tracy_force_inline bool& ShowFull( const void* ptr )
{
auto it = m_showFull.find( ptr );