From 11f4dcbf1ed8d2854813fbc013e2698fe85379e4 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 26 Mar 2019 21:41:44 +0100 Subject: [PATCH] Consistent variable naming. --- server/TracyWorker.cpp | 52 +++++++++++++++++++++--------------------- server/TracyWorker.hpp | 12 +++++----- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 2c87553f..c6f603ae 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -356,7 +356,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask ) if( fileVer >= FileVersion( 0, 3, 204 ) ) { - f.Read( &m_data.m_crashEvent, sizeof( m_data.m_crashEvent ) ); + f.Read( &m_data.crashEvent, sizeof( m_data.crashEvent ) ); } if( fileVer >= FileVersion( 0, 3, 202 ) ) @@ -1977,12 +1977,12 @@ void Worker::NewZone( ZoneEvent* zone, uint64_t thread ) auto back = td->stack.back(); if( back->child < 0 ) { - back->child = int32_t( m_data.m_zoneChildren.size() ); - m_data.m_zoneChildren.push_back( Vector( zone ) ); + back->child = int32_t( m_data.zoneChildren.size() ); + m_data.zoneChildren.push_back( Vector( zone ) ); } else { - m_data.m_zoneChildren[back->child].push_back( zone ); + m_data.zoneChildren[back->child].push_back( zone ); } td->stack.push_back_non_empty( zone ); } @@ -3069,10 +3069,10 @@ void Worker::ProcessGpuZoneBeginImpl( GpuEvent* zone, const QueueGpuZoneBegin& e auto back = ctx->stack.back(); if( back->child < 0 ) { - back->child = int32_t( m_data.m_gpuChildren.size() ); - m_data.m_gpuChildren.push_back( Vector() ); + back->child = int32_t( m_data.gpuChildren.size() ); + m_data.gpuChildren.push_back( Vector() ); } - timeline = &m_data.m_gpuChildren[back->child]; + timeline = &m_data.gpuChildren[back->child]; } timeline->push_back( zone ); @@ -3276,7 +3276,7 @@ void Worker::ProcessCallstack( const QueueCallstack& ev ) next.gpu->callstack = m_pendingCallstackId; break; case NextCallstackType::Crash: - m_data.m_crashEvent.callstack = m_pendingCallstackId; + m_data.crashEvent.callstack = m_pendingCallstackId; break; default: assert( false ); @@ -3302,7 +3302,7 @@ void Worker::ProcessCallstackAlloc( const QueueCallstackAlloc& ev ) next.gpu->callstack = m_pendingCallstackId; break; case NextCallstackType::Crash: - m_data.m_crashEvent.callstack = m_pendingCallstackId; + m_data.crashEvent.callstack = m_pendingCallstackId; break; default: assert( false ); @@ -3370,10 +3370,10 @@ void Worker::ProcessCrashReport( const QueueCrashReport& ev ) auto& next = m_nextCallstack[ev.thread]; next.type = NextCallstackType::Crash; - m_data.m_crashEvent.thread = ev.thread; - m_data.m_crashEvent.time = TscTime( ev.time ); - m_data.m_crashEvent.message = ev.text; - m_data.m_crashEvent.callstack = 0; + m_data.crashEvent.thread = ev.thread; + m_data.crashEvent.time = TscTime( ev.time ); + m_data.crashEvent.message = ev.text; + m_data.crashEvent.callstack = 0; } void Worker::ProcessSysTime( const QueueSysTime& ev ) @@ -3542,14 +3542,14 @@ void Worker::ReadTimeline( FileRead& f, ZoneEvent* zone, uint16_t thread, int64_ } else { - zone->child = m_data.m_zoneChildren.size(); + zone->child = m_data.zoneChildren.size(); // Put placeholder to have proper size of zone children in nested calls - m_data.m_zoneChildren.push_back( Vector() ); + m_data.zoneChildren.push_back( Vector() ); // Real data buffer. Can't use placeholder, as the vector can be reallocated // and the buffer address will change, but the reference won't. Vector tmp; ReadTimeline( f, tmp, thread, sz, refTime ); - m_data.m_zoneChildren[zone->child] = std::move( tmp ); + m_data.zoneChildren[zone->child] = std::move( tmp ); } } @@ -3563,11 +3563,11 @@ void Worker::ReadTimelinePre042( FileRead& f, ZoneEvent* zone, uint16_t thread, } else { - zone->child = m_data.m_zoneChildren.size(); - m_data.m_zoneChildren.push_back( Vector() ); + zone->child = m_data.zoneChildren.size(); + m_data.zoneChildren.push_back( Vector() ); Vector tmp; ReadTimelinePre042( f, tmp, thread, sz, fileVer ); - m_data.m_zoneChildren[zone->child] = std::move( tmp ); + m_data.zoneChildren[zone->child] = std::move( tmp ); } } @@ -3581,11 +3581,11 @@ void Worker::ReadTimeline( FileRead& f, GpuEvent* zone, int64_t& refTime, int64_ } else { - zone->child = m_data.m_gpuChildren.size(); - m_data.m_gpuChildren.push_back( Vector() ); + zone->child = m_data.gpuChildren.size(); + m_data.gpuChildren.push_back( Vector() ); Vector tmp; ReadTimeline( f, tmp, sz, refTime, refGpuTime ); - m_data.m_gpuChildren[zone->child] = std::move( tmp ); + m_data.gpuChildren[zone->child] = std::move( tmp ); } } @@ -3599,11 +3599,11 @@ void Worker::ReadTimelinePre044( FileRead& f, GpuEvent* zone, int64_t& refTime, } else { - zone->child = m_data.m_gpuChildren.size(); - m_data.m_gpuChildren.push_back( Vector() ); + zone->child = m_data.gpuChildren.size(); + m_data.gpuChildren.push_back( Vector() ); Vector tmp; ReadTimelinePre044( f, tmp, sz, refTime, refGpuTime, fileVer ); - m_data.m_gpuChildren[zone->child] = std::move( tmp ); + m_data.gpuChildren[zone->child] = std::move( tmp ); } } @@ -3826,7 +3826,7 @@ void Worker::Write( FileWrite& f ) f.Write( &sz, sizeof( sz ) ); f.Write( m_hostInfo.c_str(), sz ); - f.Write( &m_data.m_crashEvent, sizeof( m_data.m_crashEvent ) ); + f.Write( &m_data.crashEvent, sizeof( m_data.crashEvent ) ); sz = m_data.frames.Data().size(); f.Write( &sz, sizeof( sz ) ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 97ea6cde..5168cf66 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -175,10 +175,10 @@ private: Vector threadExpand; std::pair threadLast; - Vector> m_zoneChildren; - Vector> m_gpuChildren; + Vector> zoneChildren; + Vector> gpuChildren; - CrashEvent m_crashEvent; + CrashEvent crashEvent; }; struct MbpsBlock @@ -270,7 +270,7 @@ public: const CallstackFrameData* GetCallstackFrame( const CallstackFrameId& ptr ) const; uint64_t GetCanonicalPointer( const CallstackFrameId& id ) const; - const CrashEvent& GetCrashEvent() const { return m_data.m_crashEvent; } + const CrashEvent& GetCrashEvent() const { return m_data.crashEvent; } // Some zones may have incomplete timing data (only start time is available, end hasn't arrived yet). // GetZoneEnd() will try to infer the end time by looking at child zones (parent zone can't end @@ -293,8 +293,8 @@ public: const char* GetZoneName( const GpuEvent& ev ) const; const char* GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const; - tracy_force_inline const Vector& GetZoneChildren( int32_t idx ) const { return m_data.m_zoneChildren[idx]; } - tracy_force_inline const Vector& GetGpuChildren( int32_t idx ) const { return m_data.m_gpuChildren[idx]; } + tracy_force_inline const Vector& GetZoneChildren( int32_t idx ) const { return m_data.zoneChildren[idx]; } + tracy_force_inline const Vector& GetGpuChildren( int32_t idx ) const { return m_data.gpuChildren[idx]; } std::vector GetMatchingSourceLocation( const char* query, bool ignoreCase ) const;