Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/cros_tracing/src/noop.rs
5392 views
1
// Copyright 2022 The ChromiumOS Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Empty macros for when the tracing feature isn't used.
6
#[macro_export]
7
macro_rules! trace_event {
8
($category:ident, $name:expr $(,$t:expr)*) => {{
9
// Real backends will return an Option type.
10
None as Option<bool>
11
}};
12
}
13
14
// This is NOT part of the public cros_tracing interface. Some backends
15
// need to expose it since macros calling macros requires the inner macros
16
// to be public.
17
#[macro_export]
18
macro_rules! trace_event_begin {
19
($category:ident, $name:literal $(,$t:expr)*) => {};
20
}
21
22
// Similarly, this is not public.
23
#[macro_export]
24
macro_rules! trace_event_end {
25
($category:ident $(,$t:expr)*) => {};
26
}
27
28
#[macro_export]
29
macro_rules! trace_simple_print {
30
($($t:tt)+) => {};
31
}
32
33
#[macro_export]
34
macro_rules! push_descriptors {
35
($fd_vec:expr) => {};
36
}
37
38
pub fn init() {}
39
40