mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Calculate flame graph begin times.
This commit is contained in:
parent
92241fc0a4
commit
9d2f874b02
@ -536,6 +536,15 @@ static void MergeFlameGraph( std::vector<FlameGraphItem>& dst, std::vector<Flame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void FixupTime( std::vector<FlameGraphItem>& data, uint64_t t = 0 )
|
||||||
|
{
|
||||||
|
for( auto& v : data )
|
||||||
|
{
|
||||||
|
v.begin = t;
|
||||||
|
if( !v.children.empty() ) FixupTime( v.children, t );
|
||||||
|
t += v.time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void View::DrawFlameGraph()
|
void View::DrawFlameGraph()
|
||||||
@ -700,6 +709,7 @@ void View::DrawFlameGraph()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( m_flameSort ) SortFlameGraph( m_flameGraphData );
|
if( m_flameSort ) SortFlameGraph( m_flameGraphData );
|
||||||
|
FixupTime( m_flameGraphData );
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t zsz = 0;
|
int64_t zsz = 0;
|
||||||
|
@ -850,6 +850,7 @@ struct FlameGraphItem
|
|||||||
{
|
{
|
||||||
int64_t srcloc;
|
int64_t srcloc;
|
||||||
int64_t time;
|
int64_t time;
|
||||||
|
int64_t begin;
|
||||||
std::vector<FlameGraphItem> children;
|
std::vector<FlameGraphItem> children;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user