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

Remove indirection in plot storage.

This commit is contained in:
Bartosz Taudul 2017-11-21 02:06:17 +01:00
parent 74cd22e655
commit 63c070228c
2 changed files with 7 additions and 8 deletions

View File

@ -789,7 +789,7 @@ void View::ProcessPlotData( const QueuePlotData& ev )
}
else
{
plot = m_plots[it->second];
plot = it->second;
}
const auto time = int64_t( ev.time * m_timerMul );
@ -1278,17 +1278,16 @@ void View::HandlePlotName( uint64_t name, char* str, size_t sz )
auto it = m_plotRev.find( sl.ptr );
if( it == m_plotRev.end() )
{
const auto idx = m_plots.size();
m_plotMap.emplace( name, idx );
m_plotRev.emplace( sl.ptr, idx );
m_plotMap.emplace( name, pit->second );
m_plotRev.emplace( sl.ptr, pit->second );
m_plots.push_back( pit->second );
m_strings.emplace( name, sl.ptr );
}
else
{
m_plotMap.emplace( name, it->second );
auto plot = it->second;
m_plotMap.emplace( name, plot );
const auto& pp = pit->second->data;
auto plot = m_plots[it->second];
for( auto& v : pp )
{
InsertPlot( plot, v );

View File

@ -192,8 +192,8 @@ private:
flat_hash_map<uint64_t, StringLocation, power_of_two_std_hash<uint64_t>> m_pendingCustomStrings;
flat_hash_map<uint64_t, ThreadData*, power_of_two_std_hash<uint64_t>> m_threadMap;
flat_hash_map<uint16_t, uint32_t, power_of_two_std_hash<uint16_t>> m_gpuCtxMap;
flat_hash_map<uint64_t, uint32_t, power_of_two_std_hash<uint64_t>> m_plotMap;
std::unordered_map<const char*, uint32_t, charutil::Hasher, charutil::Comparator> m_plotRev;
flat_hash_map<uint64_t, PlotData*, power_of_two_std_hash<uint64_t>> m_plotMap;
std::unordered_map<const char*, PlotData*, charutil::Hasher, charutil::Comparator> m_plotRev;
flat_hash_map<uint64_t, PlotData*, power_of_two_std_hash<uint64_t>> m_pendingPlots;
flat_hash_map<uint64_t, uint32_t, power_of_two_std_hash<uint64_t>> m_sourceLocationShrink;
flat_hash_map<uint64_t, int32_t, power_of_two_std_hash<uint64_t>> m_pendingSourceLocationPayload;