Try to fix a perf regression by updating log

Upgrade `log` to `0.4` in multiple crates.
This commit is contained in:
Malo Jaffré 2018-01-07 16:54:05 +01:00
parent 69f17d1a0a
commit 3f073c409a
24 changed files with 43 additions and 43 deletions

36
src/Cargo.lock generated
View File

@ -373,7 +373,7 @@ dependencies = [
"filetime 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1712,7 +1712,7 @@ dependencies = [
"fmt_macros 0.0.0",
"graphviz 0.0.0",
"jobserver 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_apfloat 0.0.0",
"rustc_back 0.0.0",
"rustc_const_math 0.0.0",
@ -1774,7 +1774,7 @@ dependencies = [
name = "rustc_back"
version = "0.0.0"
dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serialize 0.0.0",
"syntax 0.0.0",
@ -1794,7 +1794,7 @@ name = "rustc_borrowck"
version = "0.0.0"
dependencies = [
"graphviz 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_errors 0.0.0",
"rustc_mir 0.0.0",
@ -1807,7 +1807,7 @@ name = "rustc_const_eval"
version = "0.0.0"
dependencies = [
"arena 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0",
@ -1837,7 +1837,7 @@ name = "rustc_data_structures"
version = "0.0.0"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serialize 0.0.0",
@ -1852,7 +1852,7 @@ dependencies = [
"arena 0.0.0",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"graphviz 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_allocator 0.0.0",
"rustc_back 0.0.0",
@ -1893,7 +1893,7 @@ name = "rustc_incremental"
version = "0.0.0"
dependencies = [
"graphviz 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
@ -1906,7 +1906,7 @@ dependencies = [
name = "rustc_lint"
version = "0.0.0"
dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_const_eval 0.0.0",
"syntax 0.0.0",
@ -1939,7 +1939,7 @@ name = "rustc_metadata"
version = "0.0.0"
dependencies = [
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"proc_macro 0.0.0",
"rustc 0.0.0",
"rustc_back 0.0.0",
@ -1958,7 +1958,7 @@ dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"graphviz 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_apfloat 0.0.0",
@ -1988,7 +1988,7 @@ dependencies = [
name = "rustc_passes"
version = "0.0.0"
dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_const_eval 0.0.0",
"rustc_const_math 0.0.0",
@ -2027,7 +2027,7 @@ name = "rustc_resolve"
version = "0.0.0"
dependencies = [
"arena 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
@ -2039,7 +2039,7 @@ dependencies = [
name = "rustc_save_analysis"
version = "0.0.0"
dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rls-data 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
@ -2058,7 +2058,7 @@ dependencies = [
"cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2086,7 +2086,7 @@ version = "0.0.0"
dependencies = [
"ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_back 0.0.0",
"rustc_data_structures 0.0.0",
@ -2111,7 +2111,7 @@ version = "0.0.0"
dependencies = [
"arena 0.0.0",
"fmt_macros 0.0.0",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0",
@ -2413,7 +2413,7 @@ name = "syntax"
version = "0.0.0"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",

View File

@ -14,7 +14,7 @@ bitflags = "1.0"
fmt_macros = { path = "../libfmt_macros" }
graphviz = { path = "../libgraphviz" }
jobserver = "0.1"
log = "0.3"
log = "0.4"
rustc_apfloat = { path = "../librustc_apfloat" }
rustc_back = { path = "../librustc_back" }
rustc_const_math = { path = "../librustc_const_math" }

View File

@ -1068,7 +1068,7 @@ pub fn map_crate<'hir>(sess: &::session::Session,
cmdline_args)
};
if log_enabled!(::log::LogLevel::Debug) {
if log_enabled!(::log::Level::Debug) {
// This only makes sense for ordered stores; note the
// enumerate to count the number of entries.
let (entries_less_1, _) = map.iter().filter(|&x| {

View File

@ -11,7 +11,7 @@ crate-type = ["dylib"]
[dependencies]
syntax = { path = "../libsyntax" }
serialize = { path = "../libserialize" }
log = "0.3"
log = "0.4"
rand = "0.3"
[features]

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
test = false
[dependencies]
log = "0.3"
log = "0.4"
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
graphviz = { path = "../libgraphviz" }

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
[dependencies]
arena = { path = "../libarena" }
log = "0.3"
log = "0.4"
rustc = { path = "../librustc" }
rustc_const_math = { path = "../librustc_const_math" }
rustc_data_structures = { path = "../librustc_data_structures" }

View File

@ -9,7 +9,7 @@ path = "lib.rs"
crate-type = ["dylib"]
[dependencies]
log = "0.3"
log = "0.4"
serialize = { path = "../libserialize" }
cfg-if = "0.1.2"
stable_deref_trait = "1.0.0"
@ -17,4 +17,4 @@ parking_lot_core = "0.2.8"
[dependencies.parking_lot]
version = "0.5"
features = ["nightly"]
features = ["nightly"]

View File

@ -11,7 +11,7 @@ crate-type = ["dylib"]
[dependencies]
arena = { path = "../libarena" }
graphviz = { path = "../libgraphviz" }
log = { version = "0.3", features = ["release_max_level_info"] }
log = { version = "0.4", features = ["release_max_level_info"] }
env_logger = { version = "0.4", default-features = false }
rustc = { path = "../librustc" }
rustc_allocator = { path = "../librustc_allocator" }

View File

@ -253,14 +253,14 @@ pub fn compile_input(sess: &Session,
result?;
if log_enabled!(::log::LogLevel::Info) {
if log_enabled!(::log::Level::Info) {
println!("Pre-trans");
tcx.print_debug_stats();
}
let trans = phase_4_translate_to_llvm::<DefaultTransCrate>(tcx, rx);
if log_enabled!(::log::LogLevel::Info) {
if log_enabled!(::log::Level::Info) {
println!("Post-trans");
tcx.print_debug_stats();
}

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
[dependencies]
graphviz = { path = "../libgraphviz" }
log = "0.3"
log = "0.4"
rand = "0.3"
rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
test = false
[dependencies]
log = "0.3"
log = "0.4"
rustc = { path = "../librustc" }
rustc_const_eval = { path = "../librustc_const_eval" }
syntax = { path = "../libsyntax" }

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
[dependencies]
flate2 = "1.0"
log = "0.3"
log = "0.4"
proc_macro = { path = "../libproc_macro" }
rustc = { path = "../librustc" }
rustc_back = { path = "../librustc_back" }

View File

@ -1051,7 +1051,7 @@ impl<'a> middle::cstore::CrateLoader for CrateLoader<'a> {
self.inject_allocator_crate(krate);
self.inject_panic_runtime(krate);
if log_enabled!(log::LogLevel::Info) {
if log_enabled!(log::Level::Info) {
dump_crates(&self.cstore);
}
}

View File

@ -11,7 +11,7 @@ crate-type = ["dylib"]
[dependencies]
bitflags = "1.0"
graphviz = { path = "../libgraphviz" }
log = "0.3"
log = "0.4"
log_settings = "0.1.1"
rustc = { path = "../librustc" }
rustc_back = { path = "../librustc_back" }

View File

@ -781,7 +781,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
}
}
if log_enabled!(::log::LogLevel::Trace) {
if log_enabled!(::log::Level::Trace) {
self.dump_local(dest);
}

View File

@ -209,7 +209,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
}
};
if log_enabled!(::log::LogLevel::Trace) {
if log_enabled!(::log::Level::Trace) {
self.dump_local(place);
}

View File

@ -9,7 +9,7 @@ path = "lib.rs"
crate-type = ["dylib"]
[dependencies]
log = "0.3"
log = "0.4"
rustc = { path = "../librustc" }
rustc_const_eval = { path = "../librustc_const_eval" }
rustc_const_math = { path = "../librustc_const_math" }

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
test = false
[dependencies]
log = "0.3"
log = "0.4"
syntax = { path = "../libsyntax" }
rustc = { path = "../librustc" }
arena = { path = "../libarena" }

View File

@ -9,7 +9,7 @@ path = "lib.rs"
crate-type = ["dylib"]
[dependencies]
log = "0.3"
log = "0.4"
rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_typeck = { path = "../librustc_typeck" }

View File

@ -13,7 +13,7 @@ test = false
bitflags = "1.0"
flate2 = "1.0"
jobserver = "0.1.5"
log = "0.3"
log = "0.4"
num_cpus = "1.0"
rustc = { path = "../librustc" }
rustc-demangle = "0.1.4"

View File

@ -12,7 +12,7 @@ test = false
[dependencies]
ar = "0.3.0"
flate2 = "1.0"
log = "0.3"
log = "0.4"
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }

View File

@ -10,7 +10,7 @@ crate-type = ["dylib"]
test = false
[dependencies]
log = "0.3"
log = "0.4"
syntax = { path = "../libsyntax" }
arena = { path = "../libarena" }
fmt_macros = { path = "../libfmt_macros" }

View File

@ -11,7 +11,7 @@ crate-type = ["dylib"]
[dependencies]
bitflags = "1.0"
serialize = { path = "../libserialize" }
log = "0.3"
log = "0.4"
syntax_pos = { path = "../libsyntax_pos" }
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
rustc_errors = { path = "../librustc_errors" }

View File

@ -8,7 +8,7 @@ diff = "0.1.10"
env_logger = { version = "0.4", default-features = false }
filetime = "0.1"
getopts = "0.2"
log = "0.3"
log = "0.4"
regex = "0.2"
rustc-serialize = "0.3"