aboutsummaryrefslogtreecommitdiffstats
path: root/components/background_hang_monitor
Commit message (Collapse)AuthorAgeFilesLines
* Organize component Cargo.toml dependencies (#36224)Alex Touchet2025-03-301-3/+3
| | | Signed-off-by: Alex Touchet <26315797+atouchet@users.noreply.github.com>
* chore: Move unsafe operations in unsafe functions to unsafe blocks (#36017)DK Liao2025-03-182-44/+46
| | | Signed-off-by: DK Liao <dklassic@gmail.com>
* Migrate to the 2024 edition (#35755)Simon Wülker2025-03-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | * Migrate to 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow unsafe_op_in_unsafe_fn lint This lint warns by default in the 2024 edition, but is *way* too noisy for servo. We might enable it in the future, but not now. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Compile using the 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* bhs: Remove direct link to `liblzma` (#35924)Martin Robinson2025-03-121-5/+0
| | | | | | | This workaround doesn't seem to be necessary any longer. Fixes #35914. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-032-3/+3
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Only compile platform samplers when cargo feature enabled (#35312)Josh Matthews2025-02-062-4/+5
| | | | | | | | | | | | | * background_hang_monitor: Only compile platform samplers when cargo feature enabled. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * background_hang_monitor: Make nix dependency optional. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* libservo: Make background hang monitor integration optional. (#35256)Josh Matthews2025-02-012-4/+10
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* libservo: Port desktop servoshell to use the new `WebView` API (#35183)Martin Robinson2025-01-281-11/+11
| | | | | | | This removes all uses of `EmbedderEvent` in the desktop servoshell to use the new `WebView` API -- filling it out when necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
* Add `rust-version` to all `Cargo.toml` files (#33483)Martin Robinson2024-09-171-0/+1
| | | | | | | This is another step preparing for building Servo without `mach`. Fixes #33430. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* background_hang_monitor: Add musl compatibility (#33153)A. Wilcox2024-08-213-4/+19
| | | | | | | musl does not have libunwind readily available; even if it did, it has no concept of ucontext (needing an external lib). Similar to ohos, disable the background hang monitor and use the DummySampler. Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
* ohos/android: Redirect stdout/stderr to `log` sink (#32858)Jonathan Schwender2024-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ohos: redirect stdout/stderr to logging sink Based on the existing android `redirect_stdout_to_logcat` implementation, but using the safe abstractions from `nix` and dumping to the `log` sink, instead of directly writing the log. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * android: Use new shared implementation for logcat redirection. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * servoshell: Register cfg(production) Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Update ports/servoshell/egl/log.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * Change info! to debug! to match original behavior on android Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Dont use lazy static to construct mutexes (#33047)Simon Wülker2024-08-142-6/+1
| | | | | | | | | | | | | | | | | | | | | * Remove usage of lazy-static in background_hang_monitor The lazy-static crate was only used to construct a mutex, but since Mutex::new is const this can be done at compiletime instead. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove usage of lazy-static in servoshell Lazy-static was only used to construct a mutex, but since Mutex::new is const this can simply be done at compiletime. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* ohos: Fix x86_64-unknown-linux-ohos (#33029)Jonathan Schwender2024-08-143-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * ohos: Fix compilation for x86_64 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Use the SDK compiler-wrapper When compiling for x86_64-unknown-linux-ohos without the compiler wrapper, for some reason mozjs_sys will be refercing a wrong mangled symbol resulting in the following error when loading the .so at runtime: ``` _ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE: symbol not found ``` This problem does not occur when compiling for aarch64 or when using the compiler wrapper. In this case the correct symbol `_ZNSt4__n111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE` is referenced. It's unclear why manually passing the flags via CFLAGS / CXXFLAGS does not work. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Bump duplicated nix to 0.29 (#32764)Jonathan Schwender2024-07-131-1/+1
| | | Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Use workspace definitions for all crates and update to the 2021 edition (#32544)Martin Robinson2024-06-181-5/+5
|
* deps: Switch from `winapi` to `windows_sys` in Servo code (#32516)Martin Robinson2024-06-171-5/+5
| | | | | This is part of the switch from `winapi` to `windows-sys`. `windows-sys` is maintained by Microsoft, so is more "official." More and more crates are switching to it.
* build: Fix build warnings on Windows (#32500)Martin Robinson2024-06-151-0/+5
| | | | | Disable some code for Windows, which is causing build warnings. When it cannot be easily disabled (mainly for the incomplete BHM and sandbox feature), allow dead code.
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-174-10/+11
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* servoshell: Upgrade `egui` and many other dependencies (#31278)Magnus Larsen2024-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * servoshell: Upgrade `egui` and many other dependencies This upgrades: - `core-graphics` - `core-text` - `egui` and friends - `font-kit` - `glow` and friends - `harfbuzz-sys` - `jni` - `nix` - `raqote` - `raw-window-handle` - `winit` * Downgrade jni until we can properly upgrade * Update some test results It's unclear why these are now passing, but they are. --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* fix: missing thread name when spawning (#31656)Ngo Iok Ui (Wu Yu Wei)2024-03-141-0/+1
| | | | | * Add missing thread name when spawning * Update namings
* Fix clippy warnings in components/third_party (#31623)Mucha Naibei2024-03-121-2/+0
|
* clippy: fix warnings in various modules in components (#31568)eri2024-03-085-37/+27
| | | | | | | | | * clippy: fix warnings in various modules in components * fix: unit tests * fix: build on android * fix: all samplers use new_boxed
* BHM: Support aarch64 for Mac sampler (#31298)Rajesh Malviya2024-02-092-23/+42
| | | Replaced unmaintained `mach` crate with `mach2`, and added support for getting arm registers.
* Preliminary Android build support (#31086)Mukilan Thiyagarajan2024-01-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Android build * Fixes * More fixes - Still failing in the linking step * More work on getting linking working Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: use mozjs with ndk r25c. loads servo.org more android build fixes. * fix ./mach run for android and make it follow logs Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * add experimental logic for compositor pause/resume Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * pass DPI from android to simpleservo Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: add android workflow Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * switch to ANDROID_SDK_ROOT and ANDROID_NDK_ROOT vars Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade gradle to 4.10.1 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade to gradle 5.1.1 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade to gradle 8 and agp 8 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * make compositing work again with external present Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: improve mach support for non-NixOS and CI Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix sampler compilation bug introduced in #30490 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: add android build to main workflow Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * gradle: set MinSdk = targetSdk = 30 NDK requires we compile against the minSdk API level which is 30 in our case. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * add instructions for android in README.md Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: move servosurface to servoview Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: uncomment the mediasession callbacks on MainActivity Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: fix crash on MainAtivity.onDestroy Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: drop VR, arm 5 and unused code This commit drops: * support for google, oculusvr * support for arm5 architecture and also removes * fakeld scripts * unused java code Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * cleanup shell.nix Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: add FIXMEs for gstreamer code Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * apk: remove commented code and debug logs Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * cleanup ServoView.java Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: comment call to download gstreamer deps for android Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * disable bluetooth for jniapi as blurdroid is broken Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fixup! README.md * fixup! remove change in Cargo.toml * fixup! move shell variables together * fixup! cleanup jniapi/Cargo.toml comments * delete commented gstreamer related android code Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * remove unused config variable in servbuild Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: more cleanup Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * force no_static_freetype only for android * use actions to manage sdk, ndk and java Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * rename embedder event names to be more clear. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * link to startup crash issue Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * upgrade env_logger to 0.10 with duplicate exception libservo and android_logger can use env_logger 0.10 but quickcheck is still stuck on 0.8 and has not seen any activity in the last 2 years. This commit adds a duplicate exception until the quickcheck dependency can be upgraded (or replaced) Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: fix comments Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * disable jemalloc on android Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fixup! replace linux with android in cfg --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* bhm: Fix a warning in the Linux sampler (#30924)Martin Robinson2023-12-281-52/+52
| | | | Use curly braces instead of an explicit drop to control the end of a borrow.
* dependencies: Update to latest version of `unwind-sys` (#30923)Martin Robinson2023-12-231-3/+1
| | | | This allows us to remove the dependency on the git version of `unwind-sys` necessary for allowing compilation on Fedora 39.
* Fix the unwind-sys build on latest Fedora (#30906)Martin Robinson2023-12-211-1/+3
| | | | | The libunwind library version installed includes an rc number. The latest released version of the `unwind-sys` crate doesn't handle this properly, so rely on the latest commit in the upstream repository.
* Move `*_traits` and other shared types to `shared`Martin Robinson2023-11-031-1/+1
| | | | | | | | | | | | This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`.
* Fix macOS's sameple isn't used in background_hang_monitor (#30490)Ngo Iok Ui (Wu Yu Wei)2023-10-041-1/+4
|
* Update version of `nix`, and `ron` (#30330)Fabrice Desré2023-09-151-1/+1
| | | | | | | * Bump ron to 0.8.1 to pickup more recent base64 * Remove dependency on nix 0.14 * Update libloading in simpleservo
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-115-34/+30
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-083-10/+3
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Start the transition to workspace dependenciesMartin Robinson2023-05-171-7/+7
| | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* fix(bhm): deliver exit signal reliably (for real)yvt2021-06-211-22/+107
| | | | | | | | | | | | > However, as it turns out, `crossbeam-channel`'s channels don't drop > remaining messages until all associated senders *and* receivers are > dropped. This means the exit signal won't be delivered as long as > there's at least one `HangMonitorRegister` or > `BackgroundHangMonitorChan` maintaining a copy of the sender. To work > around this and guarantee a rapid delivery of the exit signal, the > sender is wrapped in `Arc`, and only the worker thread maintains a > strong reference, thus ensuring both the sender and receiver are > dropped as soon as the worker thread exits.
* fix(bhm): deliver exit signal reliably when component registration and ↵yvt2021-06-202-30/+119
| | | | | | | | | | | | | | | signal submission coincide > There's a race condition between the reception of > `BackgroundHangMonitorControlMsg::Exit` and `MonitoredComponentMsg:: > Register`. When the worker receives `Exit`, it stops receiving > messages, and any remaining messages (including the > `MonitoredComponentMsg::Register` we sent) in the channel are dropped. > Wrapping `exit_signal` with this RAII wrapper ensures the exit signal > is delivered even in such cases. This should (hopefully) eliminate the intermittent hang-ups in the test case `test_hang_monitoring_exit_signal` for good.
* refactor(bhm): reduce item visibilityyvt2021-06-201-7/+7
|
* Disable intermittent unit tests on macos.Josh Matthews2021-05-261-2/+2
|
* Ignore warnings.Josh Matthews2021-03-141-0/+2
|
* Disable hanging hang monitor tests on windowsJosh Matthews2021-03-121-0/+4
|
* improve reliability of hang monitor testsGregory Terzian2020-07-072-18/+26
|
* ensure clean shutdown of all threads running JSGregory Terzian2020-06-302-30/+147
|
* Use UnsafeCell instead of `static mut` in ↵Simon Sapin2020-06-051-60/+74
| | | | background_hang_monitor/sampler_linux.rs
* Some Cargo.toml cleanupsatouchet2020-05-131-2/+2
|
* Update ipc-channel and crossbeam-channel.Josh Matthews2020-02-201-2/+2
|
* Use surfman for managing GL surfacesPatrick Walton2019-11-011-1/+1
| | | | | | Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com> Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* Remove unused dependenciesShotaro Yamada2019-10-011-2/+0
|
* Update and dedupe nixBastien Orivel2019-09-061-1/+1
|
* Deduplicate parking_lot and friends by updating it to 0.9Bastien Orivel2019-09-051-1/+1
|
* Update ipc-channel and related dependenciesBastien Orivel2019-08-271-1/+1
|
* Remove uses of mem::uninitializedSimon Sapin2019-07-171-10/+10
|