Remove print_fuel_crate field of Session
This commit is contained in:
parent
5464b2e713
commit
c9abc7e2bb
2 changed files with 3 additions and 8 deletions
|
@ -423,10 +423,10 @@ fn run_compiler(
|
||||||
sess.print_perf_stats();
|
sess.print_perf_stats();
|
||||||
}
|
}
|
||||||
|
|
||||||
if sess.print_fuel_crate.is_some() {
|
if sess.opts.debugging_opts.print_fuel.is_some() {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Fuel used by {}: {}",
|
"Fuel used by {}: {}",
|
||||||
sess.print_fuel_crate.as_ref().unwrap(),
|
sess.opts.debugging_opts.print_fuel.as_ref().unwrap(),
|
||||||
sess.print_fuel.load(SeqCst)
|
sess.print_fuel.load(SeqCst)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,9 +173,6 @@ pub struct Session {
|
||||||
/// Tracks fuel info if `-zfuel=crate=n` is specified.
|
/// Tracks fuel info if `-zfuel=crate=n` is specified.
|
||||||
optimization_fuel: Lock<OptimizationFuel>,
|
optimization_fuel: Lock<OptimizationFuel>,
|
||||||
|
|
||||||
// The next two are public because the driver needs to read them.
|
|
||||||
/// If `-zprint-fuel=crate`, `Some(crate)`.
|
|
||||||
pub print_fuel_crate: Option<String>,
|
|
||||||
/// Always set to zero and incremented so that we can print fuel expended by a crate.
|
/// Always set to zero and incremented so that we can print fuel expended by a crate.
|
||||||
pub print_fuel: AtomicU64,
|
pub print_fuel: AtomicU64,
|
||||||
|
|
||||||
|
@ -900,7 +897,7 @@ impl Session {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref c) = self.print_fuel_crate {
|
if let Some(ref c) = self.opts.debugging_opts.print_fuel {
|
||||||
if c == crate_name {
|
if c == crate_name {
|
||||||
assert_eq!(self.threads(), 1);
|
assert_eq!(self.threads(), 1);
|
||||||
self.print_fuel.fetch_add(1, SeqCst);
|
self.print_fuel.fetch_add(1, SeqCst);
|
||||||
|
@ -1262,7 +1259,6 @@ pub fn build_session(
|
||||||
remaining: sopts.debugging_opts.fuel.as_ref().map_or(0, |i| i.1),
|
remaining: sopts.debugging_opts.fuel.as_ref().map_or(0, |i| i.1),
|
||||||
out_of_fuel: false,
|
out_of_fuel: false,
|
||||||
});
|
});
|
||||||
let print_fuel_crate = sopts.debugging_opts.print_fuel.clone();
|
|
||||||
let print_fuel = AtomicU64::new(0);
|
let print_fuel = AtomicU64::new(0);
|
||||||
|
|
||||||
let cgu_reuse_tracker = if sopts.debugging_opts.query_dep_graph {
|
let cgu_reuse_tracker = if sopts.debugging_opts.query_dep_graph {
|
||||||
|
@ -1311,7 +1307,6 @@ pub fn build_session(
|
||||||
},
|
},
|
||||||
code_stats: Default::default(),
|
code_stats: Default::default(),
|
||||||
optimization_fuel,
|
optimization_fuel,
|
||||||
print_fuel_crate,
|
|
||||||
print_fuel,
|
print_fuel,
|
||||||
jobserver: jobserver::client(),
|
jobserver: jobserver::client(),
|
||||||
driver_lint_caps,
|
driver_lint_caps,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue