mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 04:01:48 +00:00
Allow custom time offset in memory allocation list.
This commit is contained in:
parent
f0aadfe066
commit
d2cca5dc3f
@ -8653,8 +8653,10 @@ void View::DrawLockInfoWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void View::ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const char* id )
|
void View::ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const char* id, int64_t startTime )
|
||||||
{
|
{
|
||||||
|
if( startTime == -1 ) startTime = m_worker.GetTimeBegin();
|
||||||
|
|
||||||
const auto& style = ImGui::GetStyle();
|
const auto& style = ImGui::GetStyle();
|
||||||
const auto dist = std::distance( ptr, end ) + 1;
|
const auto dist = std::distance( ptr, end ) + 1;
|
||||||
const auto ty = ImGui::GetTextLineHeight() + style.ItemSpacing.y;
|
const auto ty = ImGui::GetTextLineHeight() + style.ItemSpacing.y;
|
||||||
@ -8724,7 +8726,7 @@ void View::ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const
|
|||||||
ImGui::TextUnformatted( MemSizeToString( v->size ) );
|
ImGui::TextUnformatted( MemSizeToString( v->size ) );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::PushID( idx++ );
|
ImGui::PushID( idx++ );
|
||||||
if( ImGui::Selectable( TimeToString( v->timeAlloc - m_worker.GetTimeBegin() ) ) )
|
if( ImGui::Selectable( TimeToString( v->timeAlloc - startTime ) ) )
|
||||||
{
|
{
|
||||||
CenterAtTime( v->timeAlloc );
|
CenterAtTime( v->timeAlloc );
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ private:
|
|||||||
void DrawLockInfoWindow();
|
void DrawLockInfoWindow();
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const char* id = nullptr );
|
void ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const char* id = nullptr, int64_t startTime = -1 );
|
||||||
|
|
||||||
flat_hash_map<uint32_t, PathData, nohash<uint32_t>> GetCallstackPaths( const MemData& mem ) const;
|
flat_hash_map<uint32_t, PathData, nohash<uint32_t>> GetCallstackPaths( const MemData& mem ) const;
|
||||||
std::vector<CallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
|
std::vector<CallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user