mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Symbol might be unavailable.
This commit is contained in:
parent
6721db8600
commit
8740ea710a
@ -193,11 +193,19 @@ void View::DrawFlameGraphItem( const FlameGraphItem& item, FlameGraphContext& ct
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto sym = m_worker.GetSymbolData( (uint64_t)item.srcloc );
|
auto sym = m_worker.GetSymbolData( (uint64_t)item.srcloc );
|
||||||
|
if( sym )
|
||||||
|
{
|
||||||
name = m_worker.GetString( sym->name );
|
name = m_worker.GetString( sym->name );
|
||||||
auto namehash = charutil::hash( name );
|
auto namehash = charutil::hash( name );
|
||||||
if( namehash == 0 ) namehash++;
|
if( namehash == 0 ) namehash++;
|
||||||
color = GetHsvColor( namehash, depth );
|
color = GetHsvColor( namehash, depth );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
name = "???";
|
||||||
|
color = 0xFF888888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto hiColor = HighlightColor( color );
|
const auto hiColor = HighlightColor( color );
|
||||||
const auto darkColor = DarkenColor( color );
|
const auto darkColor = DarkenColor( color );
|
||||||
|
Loading…
Reference in New Issue
Block a user