Skip to content

Commit

Permalink
Don't ever capture CPU state if timings are disabled
Browse files Browse the repository at this point in the history
This should initially help with the panic in rust-lang#7427 but doesn't solve it.
  • Loading branch information
alexcrichton committed Sep 25, 2019
1 parent 7d1d5fd commit 9ccb85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/timings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
unit_times: Vec::new(),
active: HashMap::new(),
concurrency: Vec::new(),
last_cpu_state: State::current().ok(),
last_cpu_state: if enabled { State::current().ok() } else { None },
last_cpu_recording: Instant::now(),
cpu_usage: Vec::new(),
}
Expand Down

0 comments on commit 9ccb85d

Please sign in to comment.