mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
1d0e9e389a
This patch removes the old thread_profiler bindings, and adds support for profiling WR with the tracy profiler, which is a much more advanced frame profiler. Since it's very lightweight, and only instruments annotated CPU and GPU zones, it can retain very large profiles, allowing fine grained analysis of thread interactions, CPU spikes etc. Differential Revision: https://phabricator.services.mozilla.com/D66926 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
src | ||
.cargo-checksum.json | ||
Cargo.toml | ||
LICENSE | ||
README.md |
tracy-rs
This provides a Rust integration for the Tracy profiling library (https://bitbucket.org/wolfpld/tracy).
Usage
- Clone the Tracy library from the above URL.
- Follow the steps to build the profiler GUI (e.g. in tracy/profiler/build/unix/).
- Follow the steps to build the profiler shared library (e.g. in tracy/library/unix).
- Add this crate to your project dependencies, with the 'enable_profiler' cargo feature.
- Call
tracy_rs::load
at the start of your application, providing path to library from (3). - Insert the main frame marker
tracy_frame_marker!();
at the end of your frame. - Optionally, add sub-frame markers with
tracy_begin_frame!()
andtracy_end_frame!()
. - Annotate functions to be profiled with
profile_scope!()
. - Run the application and profiler GUI.