mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-05 11:31:14 +00:00
b35e6f3018
Add a new feature "tracing" that enables tracing functionality via the "tracer" crate (sadly features and crates cannot share the same name.) Setup: tracer::start() The main functionality is a tracer::trace_scope()! macro that will add trace points for the duration of the scope. Tracing events are per thread. Finish: tracer::end() this will write the trace file (pretty printed JSON) to a file in the current directory. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
18 lines
262 B
Rust
18 lines
262 B
Rust
// Copyright © 2022 Intel Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
#[macro_export]
|
|
macro_rules! trace_scoped {
|
|
($event:expr) => {};
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! trace_point {
|
|
($event:expr) => {};
|
|
}
|
|
|
|
pub fn end() {}
|
|
pub fn start() {}
|