mirror of
https://github.com/wolfpld/tracy
synced 2025-01-15 03:48:00 +00:00
Compare commits
3 Commits
d6835f3a7a
...
ef2a25319c
Author | SHA1 | Date | |
---|---|---|---|
|
ef2a25319c | ||
|
edae542a48 | ||
|
b6db644ac6 |
2
NEWS
2
NEWS
@ -37,6 +37,8 @@ v0.x.x (xxxx-xx-xx)
|
||||
- Cache miss rate.
|
||||
- Instruction cost estimation method is no longer tied to software call
|
||||
stack sampling.
|
||||
- The image name filter entry field is now providing a list of available
|
||||
images.
|
||||
|
||||
|
||||
v0.7.8 (2021-05-19)
|
||||
|
@ -95,6 +95,22 @@ private:
|
||||
uint8_t m_idx[3];
|
||||
};
|
||||
|
||||
struct StringIdxHasher
|
||||
{
|
||||
size_t operator()( const StringIdx& key ) const
|
||||
{
|
||||
return charutil::hash( (const char*)&key, sizeof( StringIdx ) );
|
||||
}
|
||||
};
|
||||
|
||||
struct StringIdxComparator
|
||||
{
|
||||
bool operator()( const StringIdx& lhs, const StringIdx& rhs ) const
|
||||
{
|
||||
return memcmp( &lhs, &rhs, sizeof( StringIdx ) ) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
class Int24
|
||||
{
|
||||
public:
|
||||
|
@ -12580,6 +12580,38 @@ void View::DrawStatistics()
|
||||
ImGui::SameLine();
|
||||
m_statisticsImageFilter.Draw( ICON_FA_FILTER "###imageFilter", 200 );
|
||||
ImGui::SameLine();
|
||||
if( ImGui::BeginCombo( "###imageCombo", nullptr, ImGuiComboFlags_NoPreview | ImGuiComboFlags_HeightLarge ) )
|
||||
{
|
||||
unordered_flat_set<StringIdx, StringIdxHasher, StringIdxComparator> set;
|
||||
std::vector<const char*> imgNames;
|
||||
for( auto& v : m_worker.GetSymbolMap() )
|
||||
{
|
||||
auto it = set.find( v.second.imageName );
|
||||
if( it == set.end() )
|
||||
{
|
||||
set.emplace( v.second.imageName );
|
||||
}
|
||||
}
|
||||
imgNames.reserve( set.size() );
|
||||
for( auto& img : set )
|
||||
{
|
||||
imgNames.emplace_back( m_worker.GetString( img ) );
|
||||
}
|
||||
std::sort( imgNames.begin(), imgNames.end(), [] ( const auto& lhs, const auto& rhs ) { return strcmp( lhs, rhs ) < 0; } );
|
||||
for( auto& img : imgNames )
|
||||
{
|
||||
bool sel = false;
|
||||
if( ImGui::Selectable( img, &sel ) )
|
||||
{
|
||||
auto len = std::min<size_t>( 255, strlen( img ) );
|
||||
memcpy( m_statisticsImageFilter.InputBuf, img, len );
|
||||
m_statisticsImageFilter.InputBuf[len] = 0;
|
||||
m_statisticsImageFilter.Build();
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if( ImGui::Button( ICON_FA_BACKSPACE " Clear###image" ) )
|
||||
{
|
||||
m_statisticsImageFilter.Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user