servo/components/compositing
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
..
build.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Cargo.toml WR update: dependencies update 2019-03-21 09:34:42 +08:00
compositor.rs Add transparent padding around ServoSurface 2019-03-25 19:01:39 +01:00
compositor_thread.rs Use a test VRDisplay that renders to a GL window 2019-03-05 12:54:12 -06:00
gl.rs WR update: new viewport semantic 2019-03-22 15:41:48 +08:00
lib.rs Move RenderNotifier from compositing to servo 2019-02-28 19:53:54 +05:30
touch.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
windowing.rs Auto merge of #23080 - jdm:sampling-profiler, r=gterzian 2019-03-26 16:36:19 -04:00