servo/components/constellation
bors-servo 2e0191b839
Auto merge of #23080 - jdm:sampling-profiler, r=gterzian
Add a sampling profiler

This uses the code already built for the background hang monitor and adds the ability to repeatedly sample all monitored threads. This sampling allows us to generate profiles that we can translate into the format used by https://perf-html.io/, allowing us to benefit from modern Gecko performance tooling.

You can run Servo with `PROFILE_OUTPUT=foo.json` and `SAMPLING_RATE=50` (for example), otherwise these values will default to `samples.json` and 10ms, respectively. To activate the profiler, press cmd+p, and to stop profiling, press cmd+p again. This will the captured samples to be symbolicated, which will take a very long time, and eventually there will be a new JSON profile in the output location.

To create a profile for use by Gecko's tools, run `python etc/profilicate.py path/to/profile.json >gecko_profile.json`, and load `gecko_profile.json` in the https://perf-html.io/ to see something like [this](https://profiler.firefox.com/public/8137e2b11fbb92afb80090bc534fd83015c87ee6/calltree/?globalTrackOrder=0-1&thread=1&v=3);

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13103
- [x] These changes do not require tests because way too many pieces to automate

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23080)
<!-- Reviewable:end -->
2019-03-26 16:36:19 -04:00
..
browsingcontext.rs Initial window sizes are mandatory. 2018-12-14 13:12:46 -05:00
Cargo.toml Disable gaol on aarch64 2018-12-22 12:07:02 +01:00
constellation.rs Auto merge of #23080 - jdm:sampling-profiler, r=gterzian 2019-03-26 16:36:19 -04:00
event_loop.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
lib.rs Disable gaol on aarch64 2018-12-22 12:07:02 +01:00
network_listener.rs Remove redundant .clone()s 2018-12-11 10:43:51 +09:00
pipeline.rs Auto merge of #23080 - jdm:sampling-profiler, r=gterzian 2019-03-26 16:36:19 -04:00
sandboxing.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
session_history.rs Make nested browsing context navigations check the loaded status of the active document of the nested browsing context. 2019-03-07 19:01:54 -05:00
timer_scheduler.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00