Skip to content

Commit

Permalink
Don't print the profiling summary to stdout when -Zprofile-json is set
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Dec 6, 2018
1 parent c8ae2de commit 3858aff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc/session/mod.rs
Expand Up @@ -826,7 +826,7 @@ impl Session {
}

pub fn profiler<F: FnOnce(&mut SelfProfiler) -> ()>(&self, f: F) {
if self.opts.debugging_opts.self_profile {
if self.opts.debugging_opts.self_profile || self.opts.debugging_opts.profile_json {
let mut profiler = self.self_profiling.borrow_mut();
f(&mut profiler);
}
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_driver/driver.rs
Expand Up @@ -356,10 +356,10 @@ pub fn compile_input(

if sess.opts.debugging_opts.self_profile {
sess.print_profiler_results();
}

if sess.opts.debugging_opts.profile_json {
sess.save_json_results();
}
if sess.opts.debugging_opts.profile_json {
sess.save_json_results();
}

controller_entry_point!(
Expand Down

0 comments on commit 3858aff

Please sign in to comment.