diff options
| author | Wesley Wiser <wwiser@gmail.com> | 2019-02-13 08:13:30 -0500 |
|---|---|---|
| committer | Wesley Wiser <wwiser@gmail.com> | 2019-03-10 11:10:55 -0400 |
| commit | 4c8cc141863274683681a6fa3d5d4e0230780c66 (patch) | |
| tree | 427ecfcfd5b62a1287d9ff11799c247fc600b05a /src/librustc_interface | |
| parent | 913ad6d1f092c70049934ba538d342d295d35997 (diff) | |
| download | rust-4c8cc141863274683681a6fa3d5d4e0230780c66.tar.gz rust-4c8cc141863274683681a6fa3d5d4e0230780c66.zip | |
Replace TimeLine with SelfProfiler
Diffstat (limited to 'src/librustc_interface')
| -rw-r--r-- | src/librustc_interface/passes.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index d61ccd5605b..5bb47bda17b 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -67,7 +67,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)); + sess.profiler(|p| p.start_activity(ProfileCategory::Parsing, "parsing")); let krate = time(sess, "parsing", || match *input { Input::File(ref file) => parse::parse_crate_from_file(file, &sess.parse_sess), Input::Str { @@ -75,7 +75,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)); + sess.profiler(|p| p.end_activity(ProfileCategory::Parsing, "parsing")); sess.diagnostic().set_continue_after_error(true); @@ -374,7 +374,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)); + sess.profiler(|p| p.start_activity(ProfileCategory::Expansion, "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 @@ -449,7 +449,7 @@ fn configure_and_expand_inner<'a>( } krate }); - sess.profiler(|p| p.end_activity(ProfileCategory::Expansion)); + sess.profiler(|p| p.end_activity(ProfileCategory::Expansion, "macro expansion")); time(sess, "maybe building test harness", || { syntax::test::modify_for_testing( @@ -1018,9 +1018,9 @@ pub fn start_codegen<'tcx>( ::rustc::middle::dependency_format::calculate(tcx) }); - tcx.sess.profiler(|p| p.start_activity(ProfileCategory::Codegen)); + tcx.sess.profiler(|p| p.start_activity(ProfileCategory::Codegen, "codegen crate")); let codegen = time(tcx.sess, "codegen", move || codegen_backend.codegen_crate(tcx, rx)); - tcx.sess.profiler(|p| p.end_activity(ProfileCategory::Codegen)); + tcx.sess.profiler(|p| p.end_activity(ProfileCategory::Codegen, "codegen crate")); if log_enabled!(::log::Level::Info) { println!("Post-codegen"); |
