Rollup merge of #56553 - wesleywiser:silence_profiler_output, r=Mark-Simulacrum

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

cc rust-lang-nursery/rustc-perf#299
This commit is contained in:
Pietro Albini 2018-12-06 07:49:02 +01:00 committed by GitHub
commit cd1ee5edbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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);
}

View file

@ -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!(