We need to use fully qualified crate names for things like Ordering when
we use them inside macros.
BUG=None
TEST=built crosvm with tracing and checked macros work without imports
Change-Id: I7cae94822ca5c3ef188e8e46e79edfb6bd0fca5b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4560807
Auto-Submit: Morg <morg@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Morg <morg@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
* Requiring documentation for all public functions is a little too broad
(it covers the auto-gen'ed bindings too, which we don't want). This CL
removes the requirement.
* Minor issues in the hashing implemention using the sha2 crate were
fixed.
* Fixed dependency issues.
* Switch to std::ffi::c_char since this differs by platform.
* Fix clippy errors.
TEST=builds
BUG=none
Change-Id: I0757a1efa17af225d01a636c611e4ca517825632
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4522874
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
This support doesn't build quite yet, but it's safe to include now
behind a feature. We're planning to set up the build for Perfetto
libraries shortly.
BUG=b:277138899
TEST=builds (doesn't break with the feature off).
Change-Id: Iff2cbbef93be4b6d5b5464b13b25cb1b50bf91d0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4428222
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Morg <morg@chromium.org>
This CL adds a new "root" test suite for trace_marker integration tests,
since the tests require root to run in order to access the kernel's
tracefs mounted partition.
BUG=b:273379306
TEST=CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo test --features=trace_marker
Change-Id: I4656374023d91d87959f6ce0d59eb9e51bdc77bd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4349039
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Morg <morg@chromium.org>
Commit-Queue: Morg <morg@chromium.org>
If the trace_marker feature was enabled but the sysfs file could not be
opened, cros_tracing::push_descriptors() would log an error message each
time it was called. We already log an error when tracing can't be
initialized, so the extra logs aren't necessary and can be removed.
BUG=b:256052372
TEST=cargo build --features=trace_marker and run crosvm
Change-Id: If7737cf3f27d7815536310eb995b9fad7669df5d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4262324
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Rather than checking if the trace_marker file in sysfs exists and then
immediately proceeding to open it, we can just try to open it and handle
the resulting error if it doesn't exist.
Additionally, log the filename if the file can't be opened to make the
debugging process easier.
BUG=b:256052372
TEST=cargo build --features=trace_marker
Change-Id: I117324b0903afdbd351d03a18755321cacf1f42c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4262323
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
These should be written as ChromeOS and ChromiumOS (without the space)
to match the updated branding. The copyright headers were already
migrated to the new style (https://crrev.com/c/3894243), but there were
some more instances left over.
BUG=None
TEST=tools/cargo-doc
Change-Id: I8c76aea2eb33b2e370ab71ee9b5cc0a4cfd00585
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4129934
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This CL adds a new backend for the cros_tracing crate. This backend can
be enabled by building crosvm with the trace_marker feature enabled.
When the feature is not enabled, no extra overhead incurs as the default
NOOP cros_tracing crate will be compiled in instead.
BUG=b:259501910
TEST=compiled and ran crosvm with and without `--features trace_marker`
Change-Id: Ia4b929b042712a458b7d54c0362d6fda90db9e9f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4075413
Reviewed-by: Christian Blichmann <cblichmann@google.com>
Auto-Submit: Morg <morg@chromium.org>
Commit-Queue: Morg <morg@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
`tracing` conflicts with a crates.io crate. Since we may support tokio
tracing in the future, and want to submit some benchmarks against it
right now, we should rename our crate.
BUG=b:253517247
TEST=presubmit
Change-Id: I32bf64a7ce1830e881bd582e4606932782df65c6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3957598
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>