Profiling of rustc-perf’s benchmark examples

Current profiling results for clap-rs

  • MIR borrowck (49%)
  • compute-regions (29%)
  • type-check-internal (22%) — Niko is looking at this
  • subtype_constraint_generation::generate (2%) — Niko is looking at this
  • liveness_of_locals (1%)
  • RegionInferenceContext::solve (1%)
  • visit_mir (7%) — what is this ??
  • (as extra context to above note: the issue is that visit_mir is called from many places and we are not clear on why it appears, according to the profile, to be called many times directly from do_mir_borrowck…)
  • DataFlowResultsConsumer::analyze_results (7%)
  • access_place (4%)
  • do_dataflow (2%) — this would maybe be faster with datafrog…

Current profiling results for inflate

[santiago@archlinux inflate (master)]$ perf focus '{do_mir_borrowck}'
Matcher : {do_mir_borrowck}
Matches : 2290
Not Matches: 331
Percentage : 87%
[santiago@archlinux inflate (master)]$ perf focus '{do_mir_borrowck}' --tree-callees --tree-min-percent 3
Matcher : {do_mir_borrowck}
Matches : 2290
Not Matches: 331
Percentage : 87%
Tree
| matched {do_mir_borrowck} (87% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (72% total, 0% self)
: : | rustc_mir::borrow_check::nll::type_check::type_check_internal (64% total, 0% self)
: : : | rustc_mir::borrow_check::nll::type_check::type_check::_$u7b$$u7b$closure$u7d$$u7d$::h5e644cf9693979bb (63% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::type_check::liveness::generate (63% total, 59% self)
: : | rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::solve (6% total, 0% self)
: : : | rustc::util::common::time (6% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::solve_inner (6% total, 0% self)
: : : : : | rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext::compute_region_values (6% total, 0% self)
: : : : : : | >::merge (6% total, 0% self)
: : : : : : : | >::entry (5% total, 1% self)
: : : : : : : : | alloc::btree::search::search_tree (3% total, 0% self)
: : : : : : : : : | alloc::btree::search::search_tree (3% total, 3% self)
: | rustc::mir::visit::Visitor::visit_mir (5% total, 3% self)
: | as rustc_mir::dataflow::DataflowResultsConsumer<'cx, 'tcx>>::visit_statement_entry (4% total, 0% self)
: | rustc_mir::dataflow::do_dataflow (3% total, 0% self)