Fix integer types.

This commit is contained in:
Bartosz Taudul 2020-10-02 19:30:01 +02:00
parent b98f6a138a
commit a2f0f7754d
3 changed files with 21 additions and 19 deletions

View File

@ -777,7 +777,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
}
#endif
const auto mLen = strlen( op.mnemonic );
const auto mLen = (int)strlen( op.mnemonic );
if( mLen > mLenMax ) mLenMax = mLen;
if( op.size > bytesMax ) bytesMax = op.size;
@ -821,7 +821,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
{
auto it = m_jumpTable.find( v.target );
assert( it != m_jumpTable.end() );
int level = 0;
size_t level = 0;
for(;;)
{
assert( levelRanges.size() >= level );
@ -2063,7 +2063,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
const auto x0 = rect.Min.x;
const auto x1 = rect.Min.x + rect.GetWidth() * 0.2f;
float sy;
for( size_t i=0; i<m_asm.size(); i++ )
for( int i=0; i<(int)m_asm.size(); i++ )
{
if( i == m_asmSelected )
{
@ -2658,7 +2658,7 @@ void SourceView::RenderAsmLine( AsmLine& line, uint32_t ipcnt, uint32_t iptotal,
for( int i=0; i<op->numVariants; i++ )
{
const auto& var = *op->variant[i];
if( var.descNum == line.params.size() )
if( var.descNum == (int)line.params.size() )
{
int penalty = 0;
bool match = true;
@ -3542,7 +3542,7 @@ void SourceView::ResetAsm()
for( auto& line : m_asm ) memset( line.regData, 0, sizeof( line.regData ) );
}
void SourceView::FollowRead( int line, RegsX86 reg, int limit )
void SourceView::FollowRead( size_t line, RegsX86 reg, size_t limit )
{
if( limit == 0 ) return;
const auto& data = m_asm[line];
@ -3562,7 +3562,7 @@ void SourceView::FollowRead( int line, RegsX86 reg, int limit )
}
}
void SourceView::FollowWrite( int line, RegsX86 reg, int limit )
void SourceView::FollowWrite( size_t line, RegsX86 reg, size_t limit )
{
if( limit == 0 ) return;
const auto& data = m_asm[line];
@ -3577,14 +3577,15 @@ void SourceView::FollowWrite( int line, RegsX86 reg, int limit )
CheckWrite( fit - m_asm.begin(), reg, limit );
}
}
if( line-1 >= 0 )
if( line > 0 )
{
CheckWrite( line-1, reg, limit );
}
}
void SourceView::CheckRead( int line, RegsX86 reg, int limit )
void SourceView::CheckRead( size_t line, RegsX86 reg, size_t limit )
{
assert( limit > 0 );
auto& data = m_asm[line];
int idx = 0;
for(;;)
@ -3642,8 +3643,9 @@ void SourceView::CheckRead( int line, RegsX86 reg, int limit )
}
}
void SourceView::CheckWrite( int line, RegsX86 reg, int limit )
void SourceView::CheckWrite( size_t line, RegsX86 reg, size_t limit )
{
assert( limit > 0 );
auto& data = m_asm[line];
int idx = 0;
for(;;)

View File

@ -115,7 +115,7 @@ private:
{
uint64_t min;
uint64_t max;
int level;
size_t level;
std::vector<uint64_t> source;
};
@ -169,10 +169,10 @@ private:
std::vector<Token> Tokenize( const char* begin, const char* end );
void ResetAsm();
void FollowRead( int line, RegsX86 reg, int limit );
void FollowWrite( int line, RegsX86 reg, int limit );
void CheckRead( int line, RegsX86 reg, int limit );
void CheckWrite( int line, RegsX86 reg, int limit );
void FollowRead( size_t line, RegsX86 reg, size_t limit );
void FollowWrite( size_t line, RegsX86 reg, size_t limit );
void CheckRead( size_t line, RegsX86 reg, size_t limit );
void CheckWrite( size_t line, RegsX86 reg, size_t limit );
#ifndef TRACY_NO_FILESELECTOR
void Save( const Worker& worker, size_t start = 0, size_t stop = std::numeric_limits<size_t>::max() );
@ -223,7 +223,7 @@ private:
unordered_flat_map<uint64_t, uint32_t> m_locMap;
unordered_flat_map<uint64_t, JumpData> m_jumpTable;
unordered_flat_set<uint64_t> m_jumpOut;
int m_maxJumpLevel;
size_t m_maxJumpLevel;
bool m_showJumps;
unordered_flat_map<uint32_t, uint32_t> m_sourceFiles;
@ -243,8 +243,8 @@ private:
unordered_flat_set<uint32_t> m_asmSampleSelect;
unordered_flat_set<uint32_t> m_srcSampleSelect;
uint32_t m_asmGroupSelect = -1;
uint32_t m_srcGroupSelect = -1;
int32_t m_asmGroupSelect = -1;
int32_t m_srcGroupSelect = -1;
float m_srcWidth;
float m_asmWidth;

View File

@ -3943,9 +3943,9 @@ int Worker::AddGhostZone( const VarArray<CallstackFrameId>& cs, Vector<GhostZone
tmp = &m_data.ghostChildren[back.child];
}
}
const uint64_t refBackTime = vec->empty() ? 0 : vec->back().end.Val();
const int64_t refBackTime = vec->empty() ? 0 : vec->back().end.Val();
int gcnt = 0;
int idx = 0;
size_t idx = 0;
while( !vec->empty() && idx < stack.size() )
{
auto& back = vec->back();