mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Thread thread zone count.
This commit is contained in:
parent
cc3d18d51d
commit
123de74fca
@ -128,6 +128,7 @@ struct MessageData
|
|||||||
struct ThreadData
|
struct ThreadData
|
||||||
{
|
{
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
|
uint64_t count;
|
||||||
bool showFull;
|
bool showFull;
|
||||||
bool visible;
|
bool visible;
|
||||||
Vector<ZoneEvent*> timeline;
|
Vector<ZoneEvent*> timeline;
|
||||||
|
|||||||
@ -327,6 +327,7 @@ View::View( FileRead& f )
|
|||||||
{
|
{
|
||||||
auto td = m_slab.AllocInit<ThreadData>();
|
auto td = m_slab.AllocInit<ThreadData>();
|
||||||
f.Read( &td->id, sizeof( td->id ) );
|
f.Read( &td->id, sizeof( td->id ) );
|
||||||
|
f.Read( &td->count, sizeof( td->count ) );
|
||||||
ReadTimeline( f, td->timeline );
|
ReadTimeline( f, td->timeline );
|
||||||
uint64_t msz;
|
uint64_t msz;
|
||||||
f.Read( &msz, sizeof( msz ) );
|
f.Read( &msz, sizeof( msz ) );
|
||||||
@ -1085,6 +1086,7 @@ ThreadData* View::NoticeThread( uint64_t thread )
|
|||||||
m_threadMap.emplace( thread, (uint32_t)m_threads.size() );
|
m_threadMap.emplace( thread, (uint32_t)m_threads.size() );
|
||||||
auto td = m_slab.AllocInit<ThreadData>();
|
auto td = m_slab.AllocInit<ThreadData>();
|
||||||
td->id = thread;
|
td->id = thread;
|
||||||
|
td->count = 0;
|
||||||
td->showFull = true;
|
td->showFull = true;
|
||||||
td->visible = true;
|
td->visible = true;
|
||||||
m_threads.push_back( td );
|
m_threads.push_back( td );
|
||||||
@ -1099,7 +1101,9 @@ ThreadData* View::NoticeThread( uint64_t thread )
|
|||||||
void View::NewZone( ZoneEvent* zone, uint64_t thread )
|
void View::NewZone( ZoneEvent* zone, uint64_t thread )
|
||||||
{
|
{
|
||||||
m_zonesCnt++;
|
m_zonesCnt++;
|
||||||
Vector<ZoneEvent*>* timeline = &NoticeThread( thread )->timeline;
|
auto td = NoticeThread( thread );
|
||||||
|
td->count++;
|
||||||
|
Vector<ZoneEvent*>* timeline = &td->timeline;
|
||||||
InsertZone( zone, *timeline );
|
InsertZone( zone, *timeline );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3808,6 +3812,7 @@ void View::Write( FileWrite& f )
|
|||||||
for( auto& thread : m_threads )
|
for( auto& thread : m_threads )
|
||||||
{
|
{
|
||||||
f.Write( &thread->id, sizeof( thread->id ) );
|
f.Write( &thread->id, sizeof( thread->id ) );
|
||||||
|
f.Write( &thread->count, sizeof( thread->count ) );
|
||||||
WriteTimeline( f, thread->timeline );
|
WriteTimeline( f, thread->timeline );
|
||||||
sz = thread->messages.size();
|
sz = thread->messages.size();
|
||||||
f.Write( &sz, sizeof( sz ) );
|
f.Write( &sz, sizeof( sz ) );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user