Skip to content

Commit

Permalink
Rollup merge of #56553 - wesleywiser:silence_profiler_output, r=Mark-…
Browse files Browse the repository at this point in the history
…Simulacrum

Don't print the profiling summary to stdout when -Zprofile-json is set

cc rust-lang/rustc-perf#299
  • Loading branch information
pietroalbini authored Dec 6, 2018
2 parents e9e92d5 + 3858aff commit cd1ee5e
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 cd1ee5e

Please sign in to comment.