| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far the memory reporter aggregates reports from all processes, and
runs the system reporter only in the main process. Instead it is
desirable to have per-process reports. We do so by:
- creating a ProcessReports struct that holds includes the pid in
addition to the reports themselves.
- running the system memory reporter also in content processes.
- updating the about:memory page to create one report per process, and
add useful information like the pid and the urls loaded in a given
process.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch exposes a servo internal DOM API that is only made available to about:
pages on the navigator object to request memory reports. The about:memory page itself is
loaded like other html resources (eg. bad cert, net error) and makes use of this new API.
On the implementation side, notable changes:
- components/script/routed_promise.rs abstracts the setup used to fulfill a promise when the
work needs to be routed through the constellation. The goal is to migrate other similar
promise APIs in followup (eg. dom/webgpu/gpu.rs, bluetooth.rs).
- a new message is added to request a report from the memory reporter, and the memory reporter
creates a json representation of the set of memory reports.
- the post-processing of memory reports is done in Javascript in the about-memory.html page,
providing the same results as the current Rust code that outputs to stdout. We can decide
later if we want to remove the current output.
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
Switch the delay to be used between the end of a previous run and the next, instead of the start
of consecutive runs. That ensure that we don't enqueue messages when processing is slower than
the delay.
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use ROUTER::add_typed_route where possible
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update webxr, media and ipc-channel
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#33282)
Up until now, Servo was using a very old version of time to get a
cross-process monotonic timestamp (using `time::precise_time_ns()`).
This change replaces the usage of old time with a new serializable
monotonic time called `CrossProcessInstant` and uses it where `u64`
timestamps were stored before. The standard library doesn't provide this
functionality because it isn't something you can do reliably on all
platforms. The idea is that we do our best and then fall back
gracefully.
This is a big change, because Servo was using `u64` timestamps all over
the place some as raw values taken from `time::precise_time_ns()` and
some as relative offsets from the "navigation start," which is a concept
similar to DOM's `timeOrigin` (but not exactly the same). It's very
difficult to fix this situation without fixing it everywhere as the
`Instant` concept is supposed to be opaque. The good thing is that this
change clears up all ambiguity when passing times as a `time::Duration`
is unit agnostic and a `CrossProcessInstant` represents an absolute
moment in time.
The `time` version of `Duration` is used because it can both be negative
and is also serializable.
Good things:
- No need too pass around `time` and `time_precise` any longer.
`CrossProcessInstant` is also precise and monotonic.
- The distinction between a time that is unset or at `0` (at some kind
of timer epoch) is now gone.
There still a lot of work to do to clean up timing, but this is the
first step. In general, I've tried to preserve existing behavior, even
when not spec compliant, as much as possible. I plan to submit followup
PRs fixing some of the issues I've noticed.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`jemallocator` and `jemallocator-sys` crates are same as the `tikv-*`
versions and these aliases were maintained for historical reasons, based
on crates.io documentation. For newer projects, it is recommended to use
the `tikv-` versions of the crate. Even though Servo is not a new
project, it makes sense to switch to the newer version for the sake of
clarity.
Also, more importantly, `tikv-jemallocator` has new release (0.6.0)
which includes a fix for #32720. There doesn't seem to be a
corresponding version publised for the `jemallocator` crate.
Fixes #32720
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
| |
mallinfo isn't available on musl, causing linking issues on build;
make sure related functions are built only for GNU Libc
Signed-off-by: Patrycja Rosa <git@ptrcnull.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a fix for the crash issue in 64-bit ARM [#32175][1].
When targeting Android 11 and above, 64-bit ARM platforms
have the 'Tagged Pointer' feature enabled by default which
causes memory allocated using the system allocator to have
a non-zero 'tag' set in the highest byte of heap addresses.
This is incompatible with SpiderMonkey which assumes that
only the bottom 48 bits are set and asserts this at various
points.
Both Servo and Gecko have a similar architecture where
the pointer to a heap allocated DOM struct is encoded as
a JS::Value and stored in the DOM_OBJECT_SLOT (reserved
slot) of the JSObject which reflects the native DOM struct.
As observed in #32175, even Gecko crashes with `jemalloc`
disabled which suggests that support for using the native
system allocator with tagged pointers enabled by default
is not present at the moment.
[1]: https://github.com/servo/servo/issues/32175
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add OpenHarmony support for allocator / profile
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* gfx: Build harfbuzz from source on OHOS
Updates `freetype-sys` to v0.20.1, which includes a build
fix for OpenHarmony.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* gfx: Don't depend on fontconfig on OpenHarmony
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* gfx: Add ohos font fallback
Hardcode HarmonyOS_Sans_SC_Regular for Chinese
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* libservo: OHOS useragent, and explicitly opt out of sandboxing
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* libservo: Disable get_native_media_display_and_gl_context on ohos
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
|
|
|
|
|
|
|
|
|
| |
* clippy: fix warnings in various modules in components
* fix: unit tests
* fix: build on android
* fix: all samplers use new_boxed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
| |
This dependency was forked in ##20641 in order to fix the Android build.
Years have gone by and it's quite likely that many things have changed
in the Android toolchain and these dependencies. We can sort out this
issue when getting the Android build working -- or if all else fails,
disable jemalloc for Android. In the meantime, unfork the dependency and
upgrade it.
Fixes #20645.
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Linux kernel imposes a 15-byte limit on thread names[1]. This means
information that does not fit in this limit, e.g., the pipeline ID of
layout and script threads, is lost in a debugger and profiler (see the
first column of the table below).
This commit shortens the thread names used in Servo to maximize the
amount of information conveyed. It also rectifies some inconsistencies
in the names.
| Before | After |
|-------------------|-------------------|
| `BluetoothThread` | `Bluetooth` |
| `CanvasThread` | `Canvas` |
| `display alert d` | `AlertDialog` |
| `FontCacheThread` | `FontCache` |
| `GLPlayerThread` | `GLPlayer` |
| `HTML Parser` | `Parse:www.examp` |
| `LayoutThread Pi` | `Layout(1,1)` |
| `Memory profiler` | `MemoryProfiler` |
| `Memory profiler` | `MemoryProfTimer` |
| `OfflineAudioCon` | `OfflineACResolv` |
| `PullTimelineMar` | `PullTimelineDat` |
| `ScriptThread Pi` | `Script(1,1)` |
| `WebWorker for h` | `WW:www.example.` |
| `ServiceWorker f` | `SW:www.example.` |
| `ServiceWorkerMa` | `SvcWorkerManage` |
| `Time profiler t` | `TimeProfTimer` |
| `Time profiler` | `TimeProfiler` |
| `WebGL thread` | `WebGL` |
| `Choose a device` | `DevicePicker` |
| `Pick a file` | `FilePicker` |
| `Pick files` | `FilePicker` |
[1]: https://stackoverflow.com/questions/5026531/thread-name-longer-than-15-chars
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does not (yet) upgrade ./rust-toolchain
The warnings:
* dead_code "field is never read"
* redundant_semicolons "unnecessary trailing semicolon"
* non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021"
* unstable_name_collisions "a method with this name may be added to the standard library in the future"
* legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We’ve been bitten before by symbol names changing:
https://github.com/servo/heapsize/pull/46
and upstream is planning to stop using jemalloc by default:
https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465
So use the (relatively) new `#[global_allocator]` attribute
to explicitly select the system allocator on Windows
and jemalloc (now in an external crate) on other platforms.
This choice matches current defaults.
|
| |
|
|
|
|
|
| |
… because there’s a lot of it,
and script still uses any other unstable features anyway.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes #11185.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Similarly, change one instance of `thread::park_timeout_ms`.
Fixes #8694
|
|
|
|
| |
&String in codebase
|
| |
|
| |
|
| |
|
| |
|