Rename SymbolCodeData to MemoryBlock.

This commit is contained in:
Bartosz Taudul 2020-05-23 14:05:11 +02:00
parent d052e4c79d
commit f38464cf55
2 changed files with 4 additions and 4 deletions

View File

@ -1783,7 +1783,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
ssz += len;
auto ptr = (char*)m_slab.AllocBig( len );
f.Read( ptr, len );
m_data.symbolCode.emplace( symAddr, SymbolCodeData { ptr, len } );
m_data.symbolCode.emplace( symAddr, MemoryBlock { ptr, len } );
}
m_data.symbolCodeSize = ssz;
}
@ -3736,7 +3736,7 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
auto code = (char*)m_slab.AllocBig( sz );
memcpy( code, data, sz );
m_data.symbolCode.emplace( ptr, SymbolCodeData{ code, uint32_t( sz ) } );
m_data.symbolCode.emplace( ptr, MemoryBlock{ code, uint32_t( sz ) } );
m_data.symbolCodeSize += sz;
if( m_data.cpuArch == CpuArchUnknown ) return;

View File

@ -123,7 +123,7 @@ public:
uint32_t core;
};
struct SymbolCodeData
struct MemoryBlock
{
const char* data;
uint32_t len;
@ -299,7 +299,7 @@ private:
unordered_flat_map<uint32_t, unordered_flat_map<uint32_t, std::vector<uint32_t>>> cpuTopology;
unordered_flat_map<uint32_t, CpuThreadTopology> cpuTopologyMap;
unordered_flat_map<uint64_t, SymbolCodeData> symbolCode;
unordered_flat_map<uint64_t, MemoryBlock> symbolCode;
uint64_t symbolCodeSize = 0;
unordered_flat_map<uint64_t, uint64_t> codeAddressToLocation;