Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions server/TracyView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8363,18 +8363,19 @@ void View::DrawGpuInfoChildren( const V& children, int64_t ztime )
Vector<uint32_t> v;
};
uint64_t ctime = 0;
unordered_flat_map<int16_t, ChildGroup> cmap;
unordered_flat_map<StringRef, ChildGroup, StringRefHasher, StringRefComparator> cmap;
cmap.reserve( 128 );
for( size_t i=0; i<children.size(); i++ )
{
const auto& child = a(children[i]);
const auto cend = m_worker.GetZoneEnd( child );
const auto ct = cend - child.GpuStart();
const auto srcloc = child.SrcLoc();
const auto name = m_worker.GetSourceLocation( srcloc ).name;
ctime += ct;

auto it = cmap.find( srcloc );
if( it == cmap.end() ) it = cmap.emplace( srcloc, ChildGroup { srcloc } ).first;
auto it = cmap.find( name );
if( it == cmap.end() ) it = cmap.emplace( name, ChildGroup { srcloc } ).first;

it->second.t += ct;
it->second.v.push_back( i );
Expand Down