From 681b578326c938a50a093f93167081268ee88745 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 7 Apr 2017 10:34:08 -0400 Subject: [PATCH 1/2] bump required rayon version to 0.7 ...and bring jpeg-decoder along for the ride. Minor tweaks were necessary because of rayon API changes. --- Cargo.lock | 37 +++++++++++++++------ components/layout/Cargo.toml | 2 +- components/layout_thread/Cargo.toml | 2 +- components/layout_thread/lib.rs | 2 +- components/style/Cargo.toml | 2 +- components/style/gecko/global_style_data.rs | 2 +- components/style/scoped_tls.rs | 2 +- servo-tidy.toml | 1 + tests/unit/style/Cargo.toml | 2 +- 9 files changed, 35 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e27638751038..842034084a43e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -919,6 +919,11 @@ dependencies = [ "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "futures" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "gamma-lut" version = "0.1.6" @@ -1230,7 +1235,7 @@ dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jpeg-decoder 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "jpeg-decoder 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1304,11 +1309,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jpeg-decoder" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1377,7 +1382,7 @@ dependencies = [ "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", "range 0.0.1", - "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", "selectors 0.18.0", @@ -1421,7 +1426,7 @@ dependencies = [ "net_traits 0.0.1", "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", - "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_layout_interface 0.0.1", "script_traits 0.0.1", @@ -2170,10 +2175,20 @@ dependencies = [ [[package]] name = "rayon" -version = "0.6.0" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rayon-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon-core" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2784,7 +2799,7 @@ dependencies = [ "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "pdqsort 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.18.0", "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2809,7 +2824,7 @@ dependencies = [ "euclid 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.18.0", "servo_atoms 0.0.1", @@ -3427,6 +3442,7 @@ dependencies = [ "checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" "checksum freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fde23272c687e4570aefec06cb71174ec0f5284b725deac4e77ba2665d635faf" "checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" +"checksum futures 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "55f0008e13fc853f79ea8fc86e931486860d4c4c156cdffb59fa5f7fa833660a" "checksum gamma-lut 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8728df930776135895cbb25cbdd17791cde7d4285d53cf58fe6ee2e6412455" "checksum gaol 0.0.1 (git+https://github.com/servo/gaol)" = "" "checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae" @@ -3456,7 +3472,7 @@ dependencies = [ "checksum ipc-channel 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f1e8d7f511a1e2dae4e26efac30a85d2376b67d7c6f2c691ea95ebd850b017da" "checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc" "checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" -"checksum jpeg-decoder 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5c4ff3d14e7ef3522471ab712832c3dd50001f7fb7aa4cdc48af811d63b531e9" +"checksum jpeg-decoder 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "919d49b634cde303392353c5dd51153ec005a1a981c6f4b8277692a51e9d260d" "checksum js 0.1.4 (git+https://github.com/servo/rust-mozjs)" = "" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09c9d3760673c427d46f91a0350f0a84a52e6bc5a84adf26dc610b6c52436630" @@ -3522,7 +3538,8 @@ dependencies = [ "checksum quasi_codegen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b06172e92ab0099427609854ffb1512c377be5fc4beaf572ae5d5a01b8359596" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" -"checksum rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50c575b58c2b109e2fbc181820cbe177474f35610ff9e357dc75f6bac854ffbf" +"checksum rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8c83adcb08e5b922e804fe1918142b422602ef11f2fd670b0b52218cb5984a20" +"checksum rayon-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "767d91bacddf07d442fe39257bf04fd95897d1c47c545d009f6beb03efd038f8" "checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" "checksum ref_filter_map 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b5ceb840e4009da4841ed22a15eb49f64fdd00a2138945c5beacf506b2fb5ed" "checksum ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "825740057197b7d43025e7faf6477eaabc03434e153233da02d1f44602f71527" diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index dee003a53b460..5c48dde9fcb62 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -30,7 +30,7 @@ ordered-float = "0.4" parking_lot = "0.3.3" profile_traits = {path = "../profile_traits"} range = {path = "../range"} -rayon = "0.6" +rayon = "0.7" script_layout_interface = {path = "../script_layout_interface"} script_traits = {path = "../script_traits"} selectors = { path = "../selectors" } diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml index caed2b8cb83e3..ea89a21c257fb 100644 --- a/components/layout_thread/Cargo.toml +++ b/components/layout_thread/Cargo.toml @@ -25,7 +25,7 @@ msg = {path = "../msg"} net_traits = {path = "../net_traits"} parking_lot = {version = "0.3.3", features = ["nightly"]} profile_traits = {path = "../profile_traits"} -rayon = "0.6" +rayon = "0.7" script = {path = "../script"} script_layout_interface = {path = "../script_layout_interface"} script_traits = {path = "../script_traits"} diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 054d82397d59e..c6ba5b6d4e6c2 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -398,7 +398,7 @@ impl LayoutThread { opts::get().initial_window_size.to_f32() * ScaleFactor::new(1.0)); let configuration = - rayon::Configuration::new().set_num_threads(layout_threads); + rayon::Configuration::new().num_threads(layout_threads); let parallel_traversal = rayon::ThreadPool::new(configuration).ok(); debug!("Possible layout Threads: {}", layout_threads); diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index dbd5e767457bf..a3df66073ec6a 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -47,7 +47,7 @@ ordered-float = "0.4" parking_lot = "0.3.3" pdqsort = "0.1.0" precomputed-hash = "0.1" -rayon = "0.6" +rayon = "0.7" selectors = { path = "../selectors" } serde = {version = "0.9", optional = true} serde_derive = {version = "0.9", optional = true} diff --git a/components/style/gecko/global_style_data.rs b/components/style/gecko/global_style_data.rs index 857ff63d82a42..17a317345d191 100644 --- a/components/style/gecko/global_style_data.rs +++ b/components/style/gecko/global_style_data.rs @@ -40,7 +40,7 @@ lazy_static! { None } else { let configuration = - rayon::Configuration::new().set_num_threads(num_threads); + rayon::Configuration::new().num_threads(num_threads); let pool = rayon::ThreadPool::new(configuration).ok(); pool }; diff --git a/components/style/scoped_tls.rs b/components/style/scoped_tls.rs index d3e6397092176..78537bce5f977 100644 --- a/components/style/scoped_tls.rs +++ b/components/style/scoped_tls.rs @@ -27,7 +27,7 @@ impl<'scope, T: Send> ScopedTLS<'scope, T> { /// Create a new scoped TLS that will last as long as this rayon threadpool /// reference. pub fn new(p: &'scope rayon::ThreadPool) -> Self { - let count = p.num_threads(); + let count = p.current_num_threads(); let mut v = Vec::with_capacity(count); for _ in 0..count { v.push(RefCell::new(None)); diff --git a/servo-tidy.toml b/servo-tidy.toml index 6bc386c85f0bc..a2aa3a2abae2c 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -20,6 +20,7 @@ rand = [ "parking_lot_core", "phf_generator", "rayon", + "rayon-core", "servo_rand", "servo-websocket", "tempdir", diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index 6a5dc7fdcbdf4..9d9db027c6f75 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -19,7 +19,7 @@ cssparser = "0.13" euclid = "0.11" html5ever = "0.16" parking_lot = "0.3" -rayon = "0.6" +rayon = "0.7" rustc-serialize = "0.3" selectors = {path = "../../../components/selectors"} servo_atoms = {path = "../../../components/atoms"} From f51ea4ac3d23a4871a2c2c036928314bdec4ada2 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 5 May 2017 10:37:48 -0400 Subject: [PATCH 2/2] halve the process count for mac wpt ...on the theory that reducing the process count will reduce timeout problems. --- etc/ci/buildbot_steps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/ci/buildbot_steps.yml b/etc/ci/buildbot_steps.yml index c3b413742f368..586732df8751e 100644 --- a/etc/ci/buildbot_steps.yml +++ b/etc/ci/buildbot_steps.yml @@ -2,7 +2,7 @@ mac-rel-wpt1: - ./mach clean-nightlies --keep 3 --force - ./mach build --release - ./mach test-wpt-failure - - ./mach test-wpt --release --processes 8 --total-chunks 2 --this-chunk 1 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed + - ./mach test-wpt --release --processes 4 --total-chunks 2 --this-chunk 1 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed - ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --use-tracker - ./mach test-wpt --release --binary-arg=--multiprocess --processes 8 --log-raw test-wpt-mp.log --log-errorsummary wpt-mp-errorsummary.log eventsource - ./mach build-cef --release @@ -12,7 +12,7 @@ mac-rel-wpt1: mac-rel-wpt2: - ./mach clean-nightlies --keep 3 --force - ./mach build --release - - ./mach test-wpt --release --processes 8 --total-chunks 2 --this-chunk 2 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed + - ./mach test-wpt --release --processes 4 --total-chunks 2 --this-chunk 2 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed - ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --use-tracker - ./mach build-geckolib --release