Disable the self-profiler unless the -Z self-profile flag is set
Related to #51648
This commit is contained in:
parent
dae6c93641
commit
b319715456
1 changed files with 4 additions and 2 deletions
|
|
@ -826,8 +826,10 @@ impl Session {
|
|||
}
|
||||
|
||||
pub fn profiler<F: FnOnce(&mut SelfProfiler) -> ()>(&self, f: F) {
|
||||
let mut profiler = self.self_profiling.borrow_mut();
|
||||
f(&mut profiler);
|
||||
if self.opts.debugging_opts.self_profile {
|
||||
let mut profiler = self.self_profiling.borrow_mut();
|
||||
f(&mut profiler);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn print_profiler_results(&self) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue