Skip to content

Commit

Permalink
Merge pull request #3348 from Pinata-Consulting/gui-more-timers
Browse files Browse the repository at this point in the history
openroad: add more GUI timers
  • Loading branch information
maliberty authored May 17, 2023
2 parents 6d7eda3 + b097221 commit 6920ac5
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions src/gui/src/layoutViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,6 @@ void LayoutViewer::drawRulers(Painter& painter)
void LayoutViewer::drawInstanceOutlines(QPainter* painter,
const std::vector<odb::dbInst*>& insts)
{
utl::Timer timer;
int minimum_height_for_tag = nominalViewableResolution();
int minimum_size = fineViewableResolution();
const QTransform initial_xfm = painter->transform();
Expand Down Expand Up @@ -2089,7 +2088,6 @@ void LayoutViewer::drawInstanceOutlines(QPainter* painter,
}
}
painter->setTransform(initial_xfm);
debugPrint(logger_, GUI, "draw", 1, "inst outline render {}", timer);
}

// Draw the instances' shapes
Expand Down Expand Up @@ -2511,6 +2509,7 @@ void LayoutViewer::drawBlock(QPainter* painter,
{
utl::Timer timer;

utl::Timer manufacturing_grid_timer;
const int instance_limit = instanceSizeLimit();

LayerBoxes boxes;
Expand All @@ -2527,6 +2526,12 @@ void LayoutViewer::drawBlock(QPainter* painter,
}

drawManufacturingGrid(painter, bounds);
debugPrint(logger_,
GUI,
"draw",
1,
"manufacturing grid {}",
manufacturing_grid_timer);

utl::Timer inst_timer;
auto inst_range = search_.searchInsts(block,
Expand All @@ -2547,38 +2552,59 @@ void LayoutViewer::drawBlock(QPainter* painter,
}
debugPrint(logger_, GUI, "draw", 1, "inst search {}", inst_timer);

utl::Timer insts_outline;
drawInstanceOutlines(painter, insts);
debugPrint(logger_, GUI, "draw", 1, "inst outline render {}", insts_outline);

// draw blockages
utl::Timer inst_blockages;
drawBlockages(painter, block, bounds);
debugPrint(logger_, GUI, "draw", 1, "blockages {}", inst_blockages);

dbTech* tech = block->getDataBase()->getTech();
for (dbTechLayer* layer : tech->getLayers()) {
drawLayer(painter, block, layer, insts, bounds, gui_painter);
}
// draw instance names

utl::Timer inst_names;
drawInstanceNames(painter, insts);
debugPrint(logger_, GUI, "draw", 1, "instance names {}", inst_names);

utl::Timer inst_rows;
drawRows(painter, block, bounds);
debugPrint(logger_, GUI, "draw", 1, "rows {}", inst_rows);

utl::Timer inst_access_points;
if (options_->areAccessPointsVisible()) {
drawAccessPoints(gui_painter, insts);
}
debugPrint(logger_, GUI, "draw", 1, "access points {}", inst_access_points);

utl::Timer inst_module_view;
drawModuleView(painter, insts);
debugPrint(logger_, GUI, "draw", 1, "module view {}", inst_module_view);

utl::Timer inst_regions;
drawRegions(painter, block);
debugPrint(logger_, GUI, "draw", 1, "regions {}", inst_regions);

utl::Timer inst_pin_markers;
if (options_->arePinMarkersVisible()) {
drawPinMarkers(gui_painter, block, bounds);
}
debugPrint(logger_, GUI, "draw", 1, "pin markers {}", inst_pin_markers);

utl::Timer inst_cell_grid;
drawGCellGrid(painter, bounds);
debugPrint(logger_, GUI, "draw", 1, "save cell grid {}", inst_cell_grid);

utl::Timer inst_save_restore;
for (auto* renderer : Gui::get()->renderers()) {
gui_painter.saveState();
renderer->drawObjects(gui_painter);
gui_painter.restoreState();
}
debugPrint(logger_, GUI, "draw", 1, "renderers {}", inst_save_restore);

debugPrint(logger_, GUI, "draw", 1, "total render {}", timer);
}
Expand Down

0 comments on commit 6920ac5

Please sign in to comment.