gecko-dev/tools/profiler/rust-api
Nazım Can Altınova 028d69f48f Bug 1920704 - Let the C++ side fully handle the memory management of MarkerSchema objects in the Rust API r=mstange,profiler-reviewers
Previously we were using a `Pin` to create a memory location for the C++
MarkerSchema object in Rust, then we were creating this object inside that
location. To make sure that this object doesn't move around, we were using
`Pin`. But `Pin` only guarantees when it's managing a Rust object and doesn't
really guarantee when managing a foreign object like MarkerSchema from C++. So
this was creating an undefined behavior where it was surfacing in one of our
tests.

This patch changing this behavior, so now C++ side is fully responsible of
constructing the object in the heap and destructing when we are done using it.

I'm not so sure why this gets fixed when we pause the profiler before we
capture the profile, but this seems to fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D223766
2024-09-27 13:01:18 +00:00
..
macros
src Bug 1920704 - Let the C++ side fully handle the memory management of MarkerSchema objects in the Rust API r=mstange,profiler-reviewers 2024-09-27 13:01:18 +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.