Tweak timers
This commit is contained in:
parent
b650e91cf4
commit
5918c18785
@ -268,7 +268,7 @@ pub fn lower_crate<'a, 'hir>(
|
||||
// incr. comp. yet.
|
||||
dep_graph.assert_ignored();
|
||||
|
||||
let _prof_timer = sess.prof.generic_activity("hir_lowering");
|
||||
let _prof_timer = sess.prof.verbose_generic_activity("hir_lowering");
|
||||
|
||||
LoweringContext {
|
||||
crate_root: sess.parse_sess.injected_crate_name.try_get().copied(),
|
||||
|
@ -409,7 +409,6 @@ pub fn run_compiler(
|
||||
sess.code_stats.print_type_sizes();
|
||||
}
|
||||
|
||||
let _timer = sess.timer("query_linker");
|
||||
let linker = queries.linker()?;
|
||||
Ok(Some(linker))
|
||||
})?;
|
||||
|
@ -163,22 +163,19 @@ pub fn register_plugins<'a>(
|
||||
)
|
||||
});
|
||||
|
||||
let (krate, features) = sess.time("compute_features", || {
|
||||
rustc_expand::config::features(
|
||||
krate,
|
||||
&sess.parse_sess,
|
||||
sess.edition(),
|
||||
&sess.opts.debugging_opts.allow_features,
|
||||
)
|
||||
});
|
||||
let (krate, features) = rustc_expand::config::features(
|
||||
krate,
|
||||
&sess.parse_sess,
|
||||
sess.edition(),
|
||||
&sess.opts.debugging_opts.allow_features,
|
||||
);
|
||||
// these need to be set "early" so that expansion sees `quote` if enabled.
|
||||
sess.init_features(features);
|
||||
|
||||
let crate_types = util::collect_crate_types(sess, &krate.attrs);
|
||||
sess.crate_types.set(crate_types);
|
||||
|
||||
let disambiguator =
|
||||
sess.time("compute_crate_disambiguator", || util::compute_crate_disambiguator(sess));
|
||||
let disambiguator = util::compute_crate_disambiguator(sess);
|
||||
sess.crate_disambiguator.set(disambiguator);
|
||||
rustc_incremental::prepare_session_directory(sess, &crate_name, disambiguator);
|
||||
|
||||
@ -726,23 +723,18 @@ pub fn create_global_ctxt<'tcx>(
|
||||
|
||||
let query_result_on_disk_cache = rustc_incremental::load_query_result_cache(sess);
|
||||
|
||||
let codegen_backend = sess.time("load_codegen_backend", || compiler.codegen_backend());
|
||||
let codegen_backend = compiler.codegen_backend();
|
||||
let mut local_providers = ty::query::Providers::default();
|
||||
default_provide(&mut local_providers);
|
||||
codegen_backend.provide(&mut local_providers);
|
||||
|
||||
let (local_providers, extern_providers) = sess.time("load_codegen_backend", || {
|
||||
let mut local_providers = ty::query::Providers::default();
|
||||
default_provide(&mut local_providers);
|
||||
codegen_backend.provide(&mut local_providers);
|
||||
let mut extern_providers = local_providers;
|
||||
default_provide_extern(&mut extern_providers);
|
||||
codegen_backend.provide_extern(&mut extern_providers);
|
||||
|
||||
let mut extern_providers = local_providers;
|
||||
default_provide_extern(&mut extern_providers);
|
||||
codegen_backend.provide_extern(&mut extern_providers);
|
||||
|
||||
if let Some(callback) = compiler.override_queries {
|
||||
callback(sess, &mut local_providers, &mut extern_providers);
|
||||
}
|
||||
|
||||
(local_providers, extern_providers)
|
||||
});
|
||||
if let Some(callback) = compiler.override_queries {
|
||||
callback(sess, &mut local_providers, &mut extern_providers);
|
||||
}
|
||||
|
||||
let gcx = sess.time("setup_global_ctxt", || {
|
||||
global_ctxt.init_locking(|| {
|
||||
|
@ -158,7 +158,6 @@ impl<'tcx> Queries<'tcx> {
|
||||
Ok(match self.compiler.crate_name {
|
||||
Some(ref crate_name) => crate_name.clone(),
|
||||
None => {
|
||||
let _timer = self.session().timer("crate_name");
|
||||
let parse_result = self.parse()?;
|
||||
let krate = parse_result.peek();
|
||||
rustc_codegen_utils::link::find_crate_name(
|
||||
|
Loading…
x
Reference in New Issue
Block a user