about summary refs log tree commit diff
path: root/src/librustc_interface
diff options
context:
space:
mode:
authorWesley Wiser <wwiser@gmail.com>2019-04-04 19:41:49 -0400
committerWesley Wiser <wwiser@gmail.com>2019-04-12 20:27:29 -0400
commit56e434d84d8fc7f9a67c19294206c733f25b890b (patch)
treea0c6159f3a310823e1a2a1eb6d208b2dcc7d5706 /src/librustc_interface
parent99da733f7f38ce8fe68453e859b7ac96bf7caa0f (diff)
downloadrust-56e434d84d8fc7f9a67c19294206c733f25b890b.tar.gz
rust-56e434d84d8fc7f9a67c19294206c733f25b890b.zip
Use measureme in self-profiler
Related to #58372
Related to #58967
Diffstat (limited to 'src/librustc_interface')
-rw-r--r--src/librustc_interface/interface.rs4
-rw-r--r--src/librustc_interface/passes.rs14
2 files changed, 6 insertions, 12 deletions
diff --git a/src/librustc_interface/interface.rs b/src/librustc_interface/interface.rs
index 74085123f89..23575e51dfc 100644
--- a/src/librustc_interface/interface.rs
+++ b/src/librustc_interface/interface.rs
@@ -123,10 +123,6 @@ where
         profile::dump(&compiler.sess, "profile_queries".to_string())
     }
 
-    if compiler.sess.opts.debugging_opts.self_profile {
-        compiler.sess.profiler(|p| p.dump_raw_events(&compiler.sess.opts));
-    }
-
     r
 }
 
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs
index 1547e15fd48..3fd684f5d97 100644
--- a/src/librustc_interface/passes.rs
+++ b/src/librustc_interface/passes.rs
@@ -69,7 +69,7 @@ pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> {
         .set_continue_after_error(sess.opts.debugging_opts.continue_parse_after_error);
     hygiene::set_default_edition(sess.edition());
 
-    sess.profiler(|p| p.start_activity(ProfileCategory::Parsing, "parsing"));
+    sess.profiler(|p| p.start_activity("parsing"));
     let krate = time(sess, "parsing", || match *input {
         Input::File(ref file) => parse::parse_crate_from_file(file, &sess.parse_sess),
         Input::Str {
@@ -77,7 +77,7 @@ pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> {
             ref name,
         } => parse::parse_crate_from_source_str(name.clone(), input.clone(), &sess.parse_sess),
     })?;
-    sess.profiler(|p| p.end_activity(ProfileCategory::Parsing, "parsing"));
+    sess.profiler(|p| p.end_activity("parsing"));
 
     sess.diagnostic().set_continue_after_error(true);
 
@@ -375,7 +375,7 @@ fn configure_and_expand_inner<'a>(
     syntax_ext::register_builtins(&mut resolver, plugin_info.syntax_exts);
 
     // Expand all macros
-    sess.profiler(|p| p.start_activity(ProfileCategory::Expansion, "macro expansion"));
+    sess.profiler(|p| p.start_activity("macro expansion"));
     krate = time(sess, "expansion", || {
         // Windows dlls do not have rpaths, so they don't know how to find their
         // dependencies. It's up to us to tell the system where to find all the
@@ -450,7 +450,7 @@ fn configure_and_expand_inner<'a>(
         }
         krate
     });
-    sess.profiler(|p| p.end_activity(ProfileCategory::Expansion, "macro expansion"));
+    sess.profiler(|p| p.end_activity("macro expansion"));
 
     time(sess, "maybe building test harness", || {
         syntax::test::modify_for_testing(
@@ -869,8 +869,6 @@ pub fn create_global_ctxt(
         yield BoxedGlobalCtxt::initial_yield(());
         box_region_allow_access!(for('gcx), (&'gcx GlobalCtxt<'gcx>), (gcx));
 
-        gcx.queries.record_computed_queries(sess);
-
         if sess.opts.debugging_opts.query_stats {
             gcx.queries.print_stats();
         }
@@ -1022,9 +1020,9 @@ pub fn start_codegen<'tcx>(
         ::rustc::middle::dependency_format::calculate(tcx)
     });
 
-    tcx.sess.profiler(|p| p.start_activity(ProfileCategory::Codegen, "codegen crate"));
+    tcx.sess.profiler(|p| p.start_activity("codegen crate"));
     let codegen = time(tcx.sess, "codegen", move || codegen_backend.codegen_crate(tcx, rx));
-    tcx.sess.profiler(|p| p.end_activity(ProfileCategory::Codegen, "codegen crate"));
+    tcx.sess.profiler(|p| p.end_activity("codegen crate"));
 
     if log_enabled!(::log::Level::Info) {
         println!("Post-codegen");