mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Separate function for checking asm function context.
This commit is contained in:
parent
9ba5180b04
commit
cc425c4a2d
@ -3485,7 +3485,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
memcpy( buf+m_maxMnemonicLen, line.operands.c_str(), line.operands.size() + 1 );
|
||||
}
|
||||
|
||||
const bool isInContext = !m_calcInlineStats || !worker.HasInlineSymbolAddresses() || worker.GetInlineSymbolForAddress( line.addr ) == m_symAddr;
|
||||
const bool isInContext = IsInContext( worker, line.addr );
|
||||
if( asmIdx == m_asmSelected )
|
||||
{
|
||||
TextColoredUnformatted( ImVec4( 1, 0.25f, 0.25f, isInContext ? 1.f : 0.5f ), buf );
|
||||
@ -4732,6 +4732,11 @@ void SourceView::CheckWrite( size_t line, RegsX86 reg, size_t limit )
|
||||
}
|
||||
}
|
||||
|
||||
bool SourceView::IsInContext( const Worker& worker, uint64_t addr ) const
|
||||
{
|
||||
return !m_calcInlineStats || !worker.HasInlineSymbolAddresses() || worker.GetInlineSymbolForAddress( addr ) == m_symAddr;
|
||||
}
|
||||
|
||||
#ifndef TRACY_NO_FILESELECTOR
|
||||
void SourceView::Save( const Worker& worker, size_t start, size_t stop )
|
||||
{
|
||||
|
@ -186,6 +186,8 @@ private:
|
||||
void CheckRead( size_t line, RegsX86 reg, size_t limit );
|
||||
void CheckWrite( size_t line, RegsX86 reg, size_t limit );
|
||||
|
||||
bool IsInContext( const Worker& worker, uint64_t addr ) const;
|
||||
|
||||
#ifndef TRACY_NO_FILESELECTOR
|
||||
void Save( const Worker& worker, size_t start = 0, size_t stop = std::numeric_limits<size_t>::max() );
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user