1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Keep raw hw sample data visually separate.

This commit is contained in:
Bartosz Taudul 2021-06-20 00:45:16 +02:00
parent 07fe0a5447
commit 3305ea2775
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 16 additions and 13 deletions

View File

@ -81,6 +81,8 @@ static constexpr const char* s_CostName[] = {
"Cache miss" "Cache miss"
}; };
static constexpr SourceView::CostType s_costSeparateAfter = SourceView::CostType::SlowCache;
static size_t CountHwSamples( const SortedVector<Int48, Int48Sort>& vec, const Range& range ) static size_t CountHwSamples( const SortedVector<Int48, Int48Sort>& vec, const Range& range )
{ {
@ -1257,6 +1259,7 @@ void SourceView::RenderSymbolView( Worker& worker, View& view )
for( auto& v : s_CostName ) for( auto& v : s_CostName )
{ {
if( ImGui::Selectable( v, idx == (int)m_cost ) ) m_cost = (CostType)idx; if( ImGui::Selectable( v, idx == (int)m_cost ) ) m_cost = (CostType)idx;
if( (CostType)idx == s_costSeparateAfter ) ImGui::Separator();
idx++; idx++;
} }
ImGui::EndCombo(); ImGui::EndCombo();

View File

@ -35,6 +35,19 @@ public:
NUMBER_OF_ENTRIES NUMBER_OF_ENTRIES
}; };
enum class CostType
{
SampleCount,
SlowBranches,
SlowCache,
Cycles,
Retirements,
BranchesTaken,
BranchMiss,
CacheAccess,
CacheMiss
};
private: private:
struct AsmOpParams struct AsmOpParams
{ {
@ -113,19 +126,6 @@ private:
} }
}; };
enum class CostType
{
SampleCount,
SlowBranches,
SlowCache,
Cycles,
Retirements,
BranchesTaken,
BranchMiss,
CacheAccess,
CacheMiss
};
public: public:
using GetWindowCallback = void*(*)(); using GetWindowCallback = void*(*)();