crosvm/perfetto
Daniel Verkamp 2c96bed807 Cargo.toml: Remove unused data_model deps
Several crates still declared a dependency on data_model despite not
using any imports from it.

BUG=b:312312646
TEST=tools/dev_container tools/presubmit

Change-Id: I63a67696c205f684b1e4ac8bdad4de5f294b63dc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5370964
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-03-13 20:00:26 +00:00
..
src Remove once_cell from a few more static Mutex inits 2024-02-27 00:57:35 +00:00
build.rs Replace #[cfg(unix)] with #[cfg(any(target_os = "android", target_os = "linux"))] 2023-10-11 00:43:29 +00:00
Cargo.toml Cargo.toml: Remove unused data_model deps 2024-03-13 20:00:26 +00:00
README.md Upstream the perfetto crate. 2023-05-11 18:12:36 +00:00

Perfetto Rust wrapper

The following instructions are based on tools/impl/bindgen-common.sh

When the Perfetto C API is updated, in order to regenerate the bindings:

  1. Download the bindgen cmdline tool.
  2. Run the bindgen command. If you are in crosvm:
    $ bindgen third_party/perfetto/include/perfetto/tracing/ctrace.h --disable-header-comment --no-layout-tests --no-doc-comments --with-derive-default --size_t-is-usize -o ./perfetto/src/bindings.rs
    
  3. Add the following to the top of the new bindings.rs file:
    #![allow(clippy::missing_safety_doc)]
    #![allow(clippy::upper_case_acronyms)]
    #![allow(non_upper_case_globals)]
    #![allow(non_camel_case_types)]
    #![allow(non_snake_case)]
    #![allow(dead_code)]
    
  4. Finally, add a copyright header to the bindings.