Backed out 2 changesets (bug 1533545) for build bustages at build/src/gfx/webrender_bindings/WebRenderAPI.cpp on a CLOSED TREE
authorOana Pop Rus <opoprus@mozilla.com>
Wed, 24 Apr 2019 15:21:49 +0300
changeset 529986 968d4ed2e984a65bfb8bd60a9820c4aa45624dd5
parent 529985 d0260a2dac6c070d654e858965b82b4eb06b0d76
child 529987 55de487e32e6c6b01f1e37ee96f23a63e5c8b638
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1533545
milestone68.0a1
backs outd0260a2dac6c070d654e858965b82b4eb06b0d76
76927efc43f5109d4fae3094e546413c1c929994
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1533545) for build bustages at build/src/gfx/webrender_bindings/WebRenderAPI.cpp on a CLOSED TREE Backed out changeset d0260a2dac6c (bug 1533545) Backed out changeset 76927efc43f5 (bug 1533545)
Cargo.lock
gfx/webrender_bindings/Cargo.toml
gfx/webrender_bindings/WebRenderAPI.cpp
gfx/webrender_bindings/src/bindings.rs
gfx/webrender_bindings/src/lib.rs
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3308,17 +3308,16 @@ dependencies = [
  "core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "nsstring 0.1.0",
- "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender 0.60.0",
 ]
 
 [[package]]
 name = "webrender_build"
--- a/gfx/webrender_bindings/Cargo.toml
+++ b/gfx/webrender_bindings/Cargo.toml
@@ -1,17 +1,16 @@
 [package]
 name = "webrender_bindings"
 version = "0.1.0"
 authors = ["The Mozilla Project Developers"]
 license = "MPL-2.0"
 
 [dependencies]
 rayon = "1"
-num_cpus = "1.7.0"
 thread_profiler = "0.1.1"
 euclid = { version = "0.19.4", features = ["serde"] }
 app_units = "0.7"
 gleam = "0.6.14"
 log = "0.4"
 nsstring = { path = "../../xpcom/rust/nsstring" }
 bincode = "1.0"
 uuid = { version = "0.6", features = ["v4"] }
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -1268,13 +1268,9 @@ void wr_transaction_notification_notifie
                                           mozilla::wr::Checkpoint aWhen) {
   auto handler = reinterpret_cast<mozilla::wr::NotificationHandler*>(aHandler);
   handler->Notify(aWhen);
   // TODO: it would be better to get a callback when the object is destroyed on
   // the rust side and delete then.
   delete handler;
 }
 
-void wr_register_thread_local_arena() {
-  jemalloc_thread_local_arena(true);
-}
-
 }  // extern C
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -26,17 +26,16 @@ use webrender::{
     PipelineInfo, ProfilerHooks, ReadPixelsFormat, Renderer, RendererOptions, RendererStats,
     SceneBuilderHooks, ShaderPrecacheFlags, Shaders, ThreadListener, UploadMethod, VertexUsageHint,
     WrShaders, set_profiler_hooks,
 };
 use thread_profiler::register_thread_with_profiler;
 use moz2d_renderer::Moz2dBlobImageHandler;
 use program_cache::{WrProgramCache, remove_disk_cache};
 use rayon;
-use num_cpus;
 use euclid::SideOffsets2D;
 use nsstring::nsAString;
 
 #[cfg(target_os = "macos")]
 use core_foundation::string::CFString;
 #[cfg(target_os = "macos")]
 use core_graphics::font::CGFont;
 
@@ -982,17 +981,16 @@ impl AsyncPropertySampler for SamplerCal
     fn deregister(&self) {
         unsafe { apz_deregister_sampler(self.window_id) }
     }
 }
 
 extern "C" {
     fn gecko_profiler_register_thread(name: *const ::std::os::raw::c_char);
     fn gecko_profiler_unregister_thread();
-    fn wr_register_thread_local_arena();
 }
 
 struct GeckoProfilerThreadListener {}
 
 impl GeckoProfilerThreadListener {
     pub fn new() -> GeckoProfilerThreadListener {
         GeckoProfilerThreadListener{}
     }
@@ -1013,26 +1011,19 @@ impl ThreadListener for GeckoProfilerThr
         }
     }
 }
 
 pub struct WrThreadPool(Arc<rayon::ThreadPool>);
 
 #[no_mangle]
 pub unsafe extern "C" fn wr_thread_pool_new() -> *mut WrThreadPool {
-    // Clamp the number of workers between 1 and 8. We get diminishing returns
-    // with high worker counts and extra overhead because of rayon and font
-    // management.
-    let num_threads = num_cpus::get().max(2).min(8);
-
     let worker = rayon::ThreadPoolBuilder::new()
         .thread_name(|idx|{ format!("WRWorker#{}", idx) })
-        .num_threads(num_threads)
         .start_handler(|idx| {
-            wr_register_thread_local_arena();
             let name = format!("WRWorker#{}", idx);
             register_thread_with_profiler(name.clone());
             gecko_profiler_register_thread(CString::new(name).unwrap().as_ptr());
         })
         .exit_handler(|_idx| {
             gecko_profiler_unregister_thread();
         })
         .build();
--- a/gfx/webrender_bindings/src/lib.rs
+++ b/gfx/webrender_bindings/src/lib.rs
@@ -5,17 +5,16 @@
 #![deny(warnings)]
 
 extern crate webrender;
 extern crate euclid;
 extern crate app_units;
 extern crate gleam;
 extern crate nsstring;
 extern crate rayon;
-extern crate num_cpus;
 extern crate thread_profiler;
 extern crate bincode;
 extern crate uuid;
 extern crate fxhash;
 
 #[macro_use]
 extern crate log;