Replace PROF_COUNTER with PROF_TIMER in some conditional places.
This commit is contained in:
parent
83a7ab2449
commit
dc07ab9df1
|
@ -309,7 +309,7 @@ void CACHED_CONTAINER::mergeFreeChunks()
|
|||
return;
|
||||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalTime;
|
||||
PROF_TIMER totalTime;
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
// Reversed free chunks map - this one stores chunk size with its offset as the key
|
||||
|
|
|
@ -142,7 +142,7 @@ bool CACHED_CONTAINER_GPU::defragmentResize( unsigned int aNewSize )
|
|||
return false;
|
||||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalTime;
|
||||
PROF_TIMER totalTime;
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
GLuint newBuffer;
|
||||
|
@ -243,7 +243,7 @@ bool CACHED_CONTAINER_GPU::defragmentResizeMemcpy( unsigned int aNewSize )
|
|||
return false;
|
||||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalTime;
|
||||
PROF_TIMER totalTime;
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
GLuint newBuffer;
|
||||
|
|
|
@ -101,7 +101,7 @@ bool CACHED_CONTAINER_RAM::defragmentResize( unsigned int aNewSize )
|
|||
return false;
|
||||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalTime;
|
||||
PROF_TIMER totalTime;
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
VERTEX* newBufferMem = static_cast<VERTEX*>( malloc( aNewSize * VERTEX_SIZE ) );
|
||||
|
|
|
@ -272,7 +272,7 @@ void GPU_NONCACHED_MANAGER::DrawIndices( const VERTEX_ITEM* aItem )
|
|||
void GPU_NONCACHED_MANAGER::EndDrawing()
|
||||
{
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalRealTime;
|
||||
PROF_TIMER totalRealTime;
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
if( m_container->GetSize() == 0 )
|
||||
|
|
|
@ -444,7 +444,7 @@ VECTOR2D OPENGL_GAL::getScreenPixelSize() const
|
|||
void OPENGL_GAL::BeginDrawing()
|
||||
{
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalRealTime( "OPENGL_GAL::beginDrawing()", true );
|
||||
PROF_TIMER totalRealTime( "OPENGL_GAL::beginDrawing()", true );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
wxASSERT_MSG( m_isContextLocked, "GAL_DRAWING_CONTEXT RAII object should have locked context. "
|
||||
|
|
|
@ -1130,7 +1130,7 @@ void VIEW::ClearTargets()
|
|||
void VIEW::Redraw()
|
||||
{
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
PROF_COUNTER totalRealTime;
|
||||
PROF_TIMER totalRealTime;
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
VECTOR2D screenSize = m_gal->GetScreenPixelSize();
|
||||
|
|
|
@ -108,7 +108,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
return false;
|
||||
|
||||
#ifdef PROFILE
|
||||
PROF_COUNTER openFiles( "OpenProjectFile" );
|
||||
PROF_TIMER openFiles( "OpenProjectFile" );
|
||||
#endif
|
||||
|
||||
wxFileName pro = fullFileName;
|
||||
|
|
|
@ -1478,7 +1478,7 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
|||
SCHEMATIC_SETTINGS& settings = Schematic().Settings();
|
||||
SCH_SHEET_LIST list = Schematic().GetSheets();
|
||||
#ifdef PROFILE
|
||||
PROF_COUNTER timer;
|
||||
PROF_TIMER timer;
|
||||
#endif
|
||||
|
||||
// Ensure schematic graph is accurate
|
||||
|
|
|
@ -187,7 +187,7 @@ void E_SERIE::combine4( uint32_t aSize )
|
|||
m_results.at( S4R ).e_value = m_results.at( S3R ).e_value; // 4R becomes better than 3R solution
|
||||
|
||||
#ifdef BENCHMARK
|
||||
PROF_COUNTER timer; // start timer to count execution time
|
||||
PROF_TIMER timer; // start timer to count execution time
|
||||
#endif
|
||||
|
||||
for( i = 0; i < aSize; i++ ) // 4R search outer loop
|
||||
|
|
|
@ -207,7 +207,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
|||
void CN_CONNECTIVITY_ALGO::searchConnections()
|
||||
{
|
||||
#ifdef PROFILE
|
||||
PROF_COUNTER garbage_collection( "garbage-collection" );
|
||||
PROF_TIMER garbage_collection( "garbage-collection" );
|
||||
#endif
|
||||
std::vector<CN_ITEM*> garbage;
|
||||
garbage.reserve( 1024 );
|
||||
|
@ -219,7 +219,7 @@ void CN_CONNECTIVITY_ALGO::searchConnections()
|
|||
|
||||
#ifdef PROFILE
|
||||
garbage_collection.Show();
|
||||
PROF_COUNTER search_basic( "search-basic" );
|
||||
PROF_TIMER search_basic( "search-basic" );
|
||||
#endif
|
||||
|
||||
thread_pool& tp = GetKiCadThreadPool();
|
||||
|
|
|
@ -161,7 +161,7 @@ void CONNECTIVITY_DATA::Move( const VECTOR2I& aDelta )
|
|||
void CONNECTIVITY_DATA::updateRatsnest()
|
||||
{
|
||||
#ifdef PROFILE
|
||||
PROF_COUNTER rnUpdate( "update-ratsnest" );
|
||||
PROF_TIMER rnUpdate( "update-ratsnest" );
|
||||
#endif
|
||||
|
||||
std::vector<RN_NET*> dirty_nets;
|
||||
|
|
|
@ -317,7 +317,7 @@ void RN_NET::compute( const std::set< std::pair<KIID, KIID> >& aExclusions )
|
|||
triangEdges.reserve( m_nodes.size() + m_boardEdges.size() );
|
||||
|
||||
#ifdef PROFILE
|
||||
PROF_COUNTER cnt("triangulate");
|
||||
PROF_TIMER cnt( "triangulate" );
|
||||
#endif
|
||||
m_triangulator->Triangulate( triangEdges );
|
||||
#ifdef PROFILE
|
||||
|
@ -331,7 +331,7 @@ void RN_NET::compute( const std::set< std::pair<KIID, KIID> >& aExclusions )
|
|||
|
||||
// Get the minimal spanning tree
|
||||
#ifdef PROFILE
|
||||
PROF_COUNTER cnt2("mst");
|
||||
PROF_TIMER cnt2( "mst" );
|
||||
#endif
|
||||
kruskalMST( triangEdges, aExclusions );
|
||||
#ifdef PROFILE
|
||||
|
|
|
@ -245,11 +245,11 @@ int polygon_triangulation_main( int argc, char *argv[] )
|
|||
|
||||
ignore_unused( poly );
|
||||
#if 0
|
||||
PROF_COUNTER unfrac("unfrac");
|
||||
PROF_TIMER unfrac("unfrac");
|
||||
poly.Unfracture( SHAPE_POLY_SET::PM_FAST );
|
||||
unfrac.Show();
|
||||
|
||||
PROF_COUNTER triangulate("triangulate");
|
||||
PROF_TIMER triangulate("triangulate");
|
||||
|
||||
for(int i =0; i< poly.OutlineCount(); i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue