1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Remove unused variables.

This commit is contained in:
Bartosz Taudul 2022-04-26 21:29:16 +02:00
parent c9240c100d
commit 95cf143336
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
4 changed files with 4 additions and 11 deletions

View File

@ -773,11 +773,13 @@ bool SysTraceStart( int64_t& samplingPeriod )
return false; return false;
#endif #endif
int paranoidLevel = 2;
const auto paranoidLevelStr = ReadFile( "/proc/sys/kernel/perf_event_paranoid" ); const auto paranoidLevelStr = ReadFile( "/proc/sys/kernel/perf_event_paranoid" );
if( !paranoidLevelStr ) return false; if( !paranoidLevelStr ) return false;
#ifdef TRACY_VERBOSE
int paranoidLevel = 2;
paranoidLevel = atoi( paranoidLevelStr ); paranoidLevel = atoi( paranoidLevelStr );
TracyDebug( "perf_event_paranoid: %i\n", paranoidLevel ); TracyDebug( "perf_event_paranoid: %i\n", paranoidLevel );
#endif
int switchId = -1, wakeupId = -1; int switchId = -1, wakeupId = -1;
const auto switchIdStr = ReadFile( "/sys/kernel/debug/tracing/events/sched/sched_switch/id" ); const auto switchIdStr = ReadFile( "/sys/kernel/debug/tracing/events/sched/sched_switch/id" );

View File

@ -3503,7 +3503,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
{ {
sprintf( buf, "...%s:%i", fileName+fnsz-(30-3-1-m_maxLine), srcline ); sprintf( buf, "...%s:%i", fileName+fnsz-(30-3-1-m_maxLine), srcline );
} }
const auto bufsz = strlen( buf );
TextDisabledUnformatted( buf ); TextDisabledUnformatted( buf );
if( ImGui::IsItemHovered() ) if( ImGui::IsItemHovered() )
{ {
@ -4590,7 +4589,6 @@ void SourceView::CountHwStats( AddrStatData& as, Worker& worker, const View& vie
void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worker& worker, bool limitView, const View& view ) void SourceView::GatherIpStats( uint64_t baseAddr, AddrStatData& as, const Worker& worker, bool limitView, const View& view )
{ {
const auto samplesReady = worker.AreSymbolSamplesReady();
auto filename = m_source.filename(); auto filename = m_source.filename();
if( limitView ) if( limitView )
{ {

View File

@ -17231,7 +17231,6 @@ unordered_flat_map<uint32_t, View::MemPathData> View::GetCallstackPaths( const M
unordered_flat_map<uint32_t, MemPathData> pathSum; unordered_flat_map<uint32_t, MemPathData> pathSum;
pathSum.reserve( m_worker.GetCallstackPayloadCount() ); pathSum.reserve( m_worker.GetCallstackPayloadCount() );
const auto zvMid = m_vd.zvStart + ( m_vd.zvEnd - m_vd.zvStart ) / 2;
if( m_memInfo.range.active ) if( m_memInfo.range.active )
{ {
auto it = std::lower_bound( mem.data.begin(), mem.data.end(), m_memInfo.range.min, []( const auto& lhs, const auto& rhs ) { return lhs.TimeAlloc() < rhs; } ); auto it = std::lower_bound( mem.data.begin(), mem.data.end(), m_memInfo.range.min, []( const auto& lhs, const auto& rhs ) { return lhs.TimeAlloc() < rhs; } );
@ -17819,8 +17818,6 @@ void View::DrawMemory()
} }
ImGui::PopStyleVar(); ImGui::PopStyleVar();
const auto zvMid = m_vd.zvStart + ( m_vd.zvEnd - m_vd.zvStart ) / 2;
ImGui::Separator(); ImGui::Separator();
ImGui::BeginChild( "##memory" ); ImGui::BeginChild( "##memory" );
if( ImGui::TreeNode( ICON_FA_AT " Allocations" ) ) if( ImGui::TreeNode( ICON_FA_AT " Allocations" ) )
@ -18218,8 +18215,6 @@ void View::DrawFrameTreeLevel( const unordered_flat_map<uint64_t, MemCallstackFr
void View::DrawFrameTreeLevel( const unordered_flat_map<uint64_t, CallstackFrameTree>& tree, int& idx ) void View::DrawFrameTreeLevel( const unordered_flat_map<uint64_t, CallstackFrameTree>& tree, int& idx )
{ {
auto& io = ImGui::GetIO();
std::vector<unordered_flat_map<uint64_t, CallstackFrameTree>::const_iterator> sorted; std::vector<unordered_flat_map<uint64_t, CallstackFrameTree>::const_iterator> sorted;
sorted.reserve( tree.size() ); sorted.reserve( tree.size() );
for( auto it = tree.begin(); it != tree.end(); ++it ) for( auto it = tree.begin(); it != tree.end(); ++it )
@ -18340,8 +18335,6 @@ void View::DrawFrameTreeLevel( const unordered_flat_map<uint64_t, CallstackFrame
void View::DrawParentsFrameTreeLevel( const unordered_flat_map<uint64_t, CallstackFrameTree>& tree, int& idx ) void View::DrawParentsFrameTreeLevel( const unordered_flat_map<uint64_t, CallstackFrameTree>& tree, int& idx )
{ {
auto& io = ImGui::GetIO();
std::vector<unordered_flat_map<uint64_t, CallstackFrameTree>::const_iterator> sorted; std::vector<unordered_flat_map<uint64_t, CallstackFrameTree>::const_iterator> sorted;
sorted.reserve( tree.size() ); sorted.reserve( tree.size() );
for( auto it = tree.begin(); it != tree.end(); ++it ) for( auto it = tree.begin(); it != tree.end(); ++it )

View File

@ -1420,7 +1420,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
data[idx].fi = fi; data[idx].fi = fi;
data[idx].state.store( JobData::InProgress, std::memory_order_release ); data[idx].state.store( JobData::InProgress, std::memory_order_release );
td->Queue( [this, &data, idx, fi, fileVer, cdict] { td->Queue( [this, &data, idx, fi, cdict] {
if( cdict ) if( cdict )
{ {
fi->csz = m_texcomp.Pack( data[idx].ctx, cdict, data[idx].outbuf, data[idx].outsz, data[idx].buf, fi->w * fi->h / 2 ); fi->csz = m_texcomp.Pack( data[idx].ctx, cdict, data[idx].outbuf, data[idx].outsz, data[idx].buf, fi->w * fi->h / 2 );