mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Save/load cpu id.
This commit is contained in:
parent
a47c7d467f
commit
6fda74e281
@ -7,7 +7,7 @@ namespace Version
|
||||
{
|
||||
enum { Major = 0 };
|
||||
enum { Minor = 6 };
|
||||
enum { Patch = 11 };
|
||||
enum { Patch = 12 };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,6 +464,12 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
{
|
||||
f.Read( m_data.cpuArch );
|
||||
}
|
||||
if( fileVer >= FileVersion( 0, 6, 12 ) )
|
||||
{
|
||||
f.Read( m_data.cpuId );
|
||||
f.Read( m_data.cpuManufacturer, 12 );
|
||||
m_data.cpuManufacturer[12] = '\0';
|
||||
}
|
||||
|
||||
uint64_t sz;
|
||||
{
|
||||
@ -2901,6 +2907,9 @@ void Worker::Exec()
|
||||
m_captureTime = welcome.epoch;
|
||||
m_ignoreMemFreeFaults = welcome.onDemand || welcome.isApple;
|
||||
m_data.cpuArch = (CpuArchitecture)welcome.cpuArch;
|
||||
m_data.cpuId = welcome.cpuId;
|
||||
memcpy( m_data.cpuManufacturer, welcome.cpuManufacturer, 12 );
|
||||
m_data.cpuManufacturer[12] = '\0';
|
||||
|
||||
char dtmp[64];
|
||||
time_t date = welcome.epoch;
|
||||
@ -6694,6 +6703,8 @@ void Worker::Write( FileWrite& f )
|
||||
f.Write( &m_pid, sizeof( m_pid ) );
|
||||
f.Write( &m_samplingPeriod, sizeof( m_samplingPeriod ) );
|
||||
f.Write( &m_data.cpuArch, sizeof( m_data.cpuArch ) );
|
||||
f.Write( &m_data.cpuId, sizeof( m_data.cpuId ) );
|
||||
f.Write( m_data.cpuManufacturer, 12 );
|
||||
|
||||
uint64_t sz = m_captureName.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
|
@ -209,6 +209,8 @@ private:
|
||||
int64_t lastTime = 0;
|
||||
uint64_t frameOffset = 0;
|
||||
CpuArchitecture cpuArch = CpuArchUnknown;
|
||||
uint32_t cpuId = 0;
|
||||
char cpuManufacturer[13];
|
||||
|
||||
unordered_flat_map<uint64_t, const char*> strings;
|
||||
Vector<const char*> stringData;
|
||||
|
Loading…
Reference in New Issue
Block a user