Added ability to zoom to allocation range in allocation window.

This commit is contained in:
Bartosz Taudul 2018-09-28 11:40:22 +02:00
parent 560163a031
commit 4960e691d4

View File

@ -6372,6 +6372,15 @@ void View::DrawMemoryAllocWindow()
const auto tidFree = m_worker.DecompressThread( ev.threadFree );
int idx = 0;
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( ICON_FA_MICROSCOPE " Zoom to allocation" ) )
#else
if( ImGui::Button( "Zoom to allocation" ) )
#endif
{
ZoomToRange( ev.timeAlloc, ev.timeFree >= 0 ? ev.timeFree : m_worker.GetLastTime() );
}
char buf[64];
sprintf( buf, "0x%" PRIx64, ev.ptr );
TextFocused( "Address:", buf );