mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Extract DrawSamplesStatistics()
This commit is contained in:
parent
4c220bdc14
commit
6b901a7156
@ -12810,13 +12810,6 @@ void View::DrawStatistics()
|
||||
const auto& symMap = m_worker.GetSymbolMap();
|
||||
const auto& symStat = m_worker.GetSymbolStats();
|
||||
|
||||
struct SymList
|
||||
{
|
||||
uint64_t symAddr;
|
||||
uint32_t incl, excl;
|
||||
uint32_t count;
|
||||
};
|
||||
|
||||
Vector<SymList> data;
|
||||
if( m_showAllSymbols )
|
||||
{
|
||||
@ -13000,6 +12993,15 @@ void View::DrawStatistics()
|
||||
}
|
||||
}
|
||||
|
||||
DrawSamplesStatistics(data, timeRange);
|
||||
}
|
||||
#endif
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
||||
void View::DrawSamplesStatistics(Vector<SymList>& data, int64_t timeRange)
|
||||
{
|
||||
static unordered_flat_map<uint64_t, SymList> inlineMap;
|
||||
assert( inlineMap.empty() );
|
||||
if( !m_statSeparateInlines )
|
||||
@ -13038,6 +13040,8 @@ void View::DrawStatistics()
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto& symMap = m_worker.GetSymbolMap();
|
||||
|
||||
if( m_statAccumulationMode == AccumulationMode::SelfOnly )
|
||||
{
|
||||
pdqsort_branchless( data.begin(), data.end(), []( const auto& l, const auto& r ) { return l.excl != r.excl ? l.excl > r.excl : l.symAddr < r.symAddr; } );
|
||||
@ -13457,9 +13461,6 @@ void View::DrawStatistics()
|
||||
inlineMap.clear();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void View::DrawCallstackWindow()
|
||||
{
|
||||
|
@ -153,6 +153,13 @@ private:
|
||||
bool highlight;
|
||||
};
|
||||
|
||||
struct SymList
|
||||
{
|
||||
uint64_t symAddr;
|
||||
uint32_t incl, excl;
|
||||
uint32_t count;
|
||||
};
|
||||
|
||||
void InitMemory();
|
||||
void InitTextEditor( ImFont* font );
|
||||
|
||||
@ -196,6 +203,7 @@ private:
|
||||
void DrawFindZone();
|
||||
void AccumulationModeComboBox();
|
||||
void DrawStatistics();
|
||||
void DrawSamplesStatistics(Vector<SymList>& data, int64_t timeRange);
|
||||
void DrawMemory();
|
||||
void DrawAllocList();
|
||||
void DrawCompare();
|
||||
|
Loading…
x
Reference in New Issue
Block a user