Skip to content

Commit cd1ee5e

Browse files
authored
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/rustc-perf#299
2 parents e9e92d5 + 3858aff commit cd1ee5e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc/session/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ impl Session {
826826
}
827827

828828
pub fn profiler<F: FnOnce(&mut SelfProfiler) -> ()>(&self, f: F) {
829-
if self.opts.debugging_opts.self_profile {
829+
if self.opts.debugging_opts.self_profile || self.opts.debugging_opts.profile_json {
830830
let mut profiler = self.self_profiling.borrow_mut();
831831
f(&mut profiler);
832832
}

src/librustc_driver/driver.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,10 @@ pub fn compile_input(
356356

357357
if sess.opts.debugging_opts.self_profile {
358358
sess.print_profiler_results();
359+
}
359360

360-
if sess.opts.debugging_opts.profile_json {
361-
sess.save_json_results();
362-
}
361+
if sess.opts.debugging_opts.profile_json {
362+
sess.save_json_results();
363363
}
364364

365365
controller_entry_point!(

0 commit comments

Comments
 (0)