gecko-dev/tools/profiler/rust-api
Nazım Can Altınova fc66871215 Bug 1877380 - Use AtomicU32::from_ptr implementation instead of a reference for RacyFeatures_sActiveAndFeatures r=aabh,profiler-reviewers,glandium
This variable is an atomic variable here:
https://searchfox.org/mozilla-central/rev/2a867dd1ab015c3ef24b774a57709fb3b3dc4961/tools/profiler/core/platform.cpp#1631

We are getting this C++ atomic variable here directly instead of using FFIs
because this is much faster and this function has to be as fast as possible
(because it will be used before adding each marker to make sure the profiler is
running.). It's used by `is_active` and `can_accept_markers` functions above
this file.

It looks like Rust 1.77 starts to give some warnings/errors for these cases
where we have shared references. This should be safe for us, because we already
know that this function can be racy. So this is something we considered and
decided that it's better to be faster.

Differential Revision: https://phabricator.services.mozilla.com/D199968
2024-02-02 15:33:28 +00:00
..
macros
src Bug 1877380 - Use AtomicU32::from_ptr implementation instead of a reference for RacyFeatures_sActiveAndFeatures r=aabh,profiler-reviewers,glandium 2024-02-02 15:33:28 +00:00
build.rs Bug 1868578 - Update CargoCallbacks usage in the profiler rust API r=aabh,profiler-reviewers 2023-12-21 13:39:23 +00:00
Cargo.toml Bug 1670633 - Update bindgen to 0.69.1 and coreaudio-sys to 0.2.14. r=supply-chain-reviewers,glandium 2023-11-24 11:33:56 +00:00
cbindgen.toml
extra-bindgen-flags.in
README.md

Gecko Profiler API for Rust

This crate is the collection of all the API endpoints for Gecko Profiler. Please use this crate instead of using raw FFI calls.

See the module documentations for more information about the specific API endpoints.