mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Save/load executable image mtime.
This commit is contained in:
parent
c92974d920
commit
8d39f91c6e
@ -7,7 +7,7 @@ namespace Version
|
|||||||
{
|
{
|
||||||
enum { Major = 0 };
|
enum { Major = 0 };
|
||||||
enum { Minor = 7 };
|
enum { Minor = 7 };
|
||||||
enum { Patch = 5 };
|
enum { Patch = 6 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +282,7 @@ Worker::Worker( const char* name, const char* program, const std::vector<ImportE
|
|||||||
, m_captureName( name )
|
, m_captureName( name )
|
||||||
, m_captureProgram( program )
|
, m_captureProgram( program )
|
||||||
, m_captureTime( 0 )
|
, m_captureTime( 0 )
|
||||||
|
, m_executableTime( 0 )
|
||||||
, m_pid( 0 )
|
, m_pid( 0 )
|
||||||
, m_samplingPeriod( 0 )
|
, m_samplingPeriod( 0 )
|
||||||
, m_stream( nullptr )
|
, m_stream( nullptr )
|
||||||
@ -534,6 +535,14 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
m_captureProgram = std::string( tmp, tmp+sz );
|
m_captureProgram = std::string( tmp, tmp+sz );
|
||||||
f.Read( m_captureTime );
|
f.Read( m_captureTime );
|
||||||
}
|
}
|
||||||
|
if( fileVer >= FileVersion( 0, 7, 6 ) )
|
||||||
|
{
|
||||||
|
f.Read( m_executableTime );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_executableTime = 0;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
f.Read( sz );
|
f.Read( sz );
|
||||||
assert( sz < 1024 );
|
assert( sz < 1024 );
|
||||||
@ -2699,6 +2708,7 @@ void Worker::Exec()
|
|||||||
m_onDemand = welcome.onDemand;
|
m_onDemand = welcome.onDemand;
|
||||||
m_captureProgram = welcome.programName;
|
m_captureProgram = welcome.programName;
|
||||||
m_captureTime = welcome.epoch;
|
m_captureTime = welcome.epoch;
|
||||||
|
m_executableTime = welcome.exectime;
|
||||||
m_ignoreMemFreeFaults = welcome.onDemand || welcome.isApple;
|
m_ignoreMemFreeFaults = welcome.onDemand || welcome.isApple;
|
||||||
m_data.cpuArch = (CpuArchitecture)welcome.cpuArch;
|
m_data.cpuArch = (CpuArchitecture)welcome.cpuArch;
|
||||||
m_codeTransfer = welcome.codeTransfer;
|
m_codeTransfer = welcome.codeTransfer;
|
||||||
@ -6774,6 +6784,7 @@ void Worker::Write( FileWrite& f )
|
|||||||
f.Write( m_captureProgram.c_str(), sz );
|
f.Write( m_captureProgram.c_str(), sz );
|
||||||
|
|
||||||
f.Write( &m_captureTime, sizeof( m_captureTime ) );
|
f.Write( &m_captureTime, sizeof( m_captureTime ) );
|
||||||
|
f.Write( &m_executableTime, sizeof( m_executableTime ) );
|
||||||
|
|
||||||
sz = m_hostInfo.size();
|
sz = m_hostInfo.size();
|
||||||
f.Write( &sz, sizeof( sz ) );
|
f.Write( &sz, sizeof( sz ) );
|
||||||
|
@ -841,6 +841,7 @@ private:
|
|||||||
std::string m_captureName;
|
std::string m_captureName;
|
||||||
std::string m_captureProgram;
|
std::string m_captureProgram;
|
||||||
uint64_t m_captureTime;
|
uint64_t m_captureTime;
|
||||||
|
uint64_t m_executableTime;
|
||||||
std::string m_hostInfo;
|
std::string m_hostInfo;
|
||||||
uint64_t m_pid;
|
uint64_t m_pid;
|
||||||
int64_t m_samplingPeriod;
|
int64_t m_samplingPeriod;
|
||||||
|
Loading…
Reference in New Issue
Block a user