mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Clicking on mem address in alloc list displays info window.
This commit is contained in:
parent
0889334462
commit
18a460e782
@ -5252,6 +5252,14 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
|||||||
ImGui::BeginChild( id ? id : "##memScroll", ImVec2( 0, std::max( ty * std::min<int64_t>( dist, 5 ), std::min( ty * dist, ImGui::GetContentRegionAvail().y ) ) ) );
|
ImGui::BeginChild( id ? id : "##memScroll", ImVec2( 0, std::max( ty * std::min<int64_t>( dist, 5 ), std::min( ty * dist, ImGui::GetContentRegionAvail().y ) ) ) );
|
||||||
ImGui::Columns( 8 );
|
ImGui::Columns( 8 );
|
||||||
ImGui::Text( "Address" );
|
ImGui::Text( "Address" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::TextDisabled( "(?)" );
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::Text( "Click on address to display memory allocation info window." );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Text( "Size" );
|
ImGui::Text( "Size" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -5302,10 +5310,17 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
|||||||
ImGui::Text( "Callstack" );
|
ImGui::Text( "Callstack" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
const auto& mem = m_worker.GetMemData();
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
while( ptr != end )
|
while( ptr != end )
|
||||||
{
|
{
|
||||||
auto v = DrawAddress( ptr );
|
auto v = DrawAddress( ptr );
|
||||||
|
if( ImGui::IsItemClicked() )
|
||||||
|
{
|
||||||
|
m_memoryAllocInfoWindow = std::distance( mem.data.begin(), v );
|
||||||
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Text( "%s", RealToString( v->size, true ) );
|
ImGui::Text( "%s", RealToString( v->size, true ) );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user