Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send textual profile data to stderr, not stdout #56555

Merged
merged 1 commit into from
Dec 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/librustc/util/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use session::config::Options;

use std::fs;
use std::io::{self, StdoutLock, Write};
use std::io::{self, StderrLock, Write};
use std::time::{Duration, Instant};

macro_rules! define_categories {
Expand Down Expand Up @@ -61,7 +61,7 @@ macro_rules! define_categories {
}
}

fn print(&self, lock: &mut StdoutLock<'_>) {
fn print(&self, lock: &mut StderrLock<'_>) {
writeln!(lock, "| Phase | Time (ms) | Queries | Hits (%) |")
.unwrap();
writeln!(lock, "| ---------------- | -------------- | -------------- | -------- |")
Expand Down Expand Up @@ -235,7 +235,7 @@ impl SelfProfiler {
self.timer_stack.is_empty(),
"there were timers running when print_results() was called");

let out = io::stdout();
let out = io::stderr();
let mut lock = out.lock();

let crate_name =
Expand Down