Bug 1797755 - Part 5: Use a single initial mark stack size regardless of whether...
[gecko.git] / third_party / rust / profiling / src / lib.rs
blob75703408d825981eb5413395044b6990ec589f62
1 //
2 // To use this library, enable one of the feature flags. Each backend implementation provides the
3 // exact same interface. Only one may be active at a time.
4 //
6 /// Proc macro for creating a scope around the function, using the name of the function for the
7 /// scope's name
8 ///
9 /// This must be done as a proc macro because tracing requires a const string
10 ///
11 /// ```
12 /// #[profiling::function]
13 /// fn my_function() {
14 ///
15 /// }
16 /// ```
17 #[cfg(feature = "procmacros")]
18 pub use profiling_procmacros::function;
20 #[cfg(feature = "profile-with-puffin")]
21 pub use puffin;
22 #[cfg(feature = "profile-with-puffin")]
23 mod puffin_impl;
24 #[cfg(feature = "profile-with-puffin")]
25 pub use puffin_impl::*;
27 #[cfg(feature = "profile-with-optick")]
28 pub use optick;
29 #[cfg(feature = "profile-with-optick")]
30 mod optick_impl;
31 #[cfg(feature = "profile-with-optick")]
32 pub use optick_impl::*;
34 #[cfg(feature = "profile-with-superluminal")]
35 pub use superluminal_perf;
36 #[cfg(feature = "profile-with-superluminal")]
37 mod superluminal_impl;
38 #[cfg(feature = "profile-with-superluminal")]
39 pub use superluminal_impl::*;
41 #[cfg(feature = "profile-with-tracing")]
42 pub use tracing;
43 #[cfg(feature = "profile-with-tracing")]
44 mod tracing_impl;
45 #[cfg(feature = "profile-with-tracing")]
46 pub use tracing_impl::*;
48 #[cfg(feature = "profile-with-tracy")]
49 pub use tracy_client;
50 #[cfg(feature = "profile-with-tracy")]
51 mod tracy_impl;
52 #[cfg(feature = "profile-with-tracy")]
53 pub use tracy_impl::*;
55 #[cfg(feature = "type-check")]
56 mod type_check_impl;
57 #[cfg(feature = "type-check")]
58 pub use type_check_impl::*;
60 #[cfg(not(any(
61     feature = "profile-with-puffin",
62     feature = "profile-with-optick",
63     feature = "profile-with-superluminal",
64     feature = "profile-with-tracing",
65     feature = "profile-with-tracy",
66     feature = "type-check"
67 )))]
68 mod empty_impl;
70 #[cfg(not(any(
71     feature = "profile-with-puffin",
72     feature = "profile-with-optick",
73     feature = "profile-with-superluminal",
74     feature = "profile-with-tracing",
75     feature = "profile-with-tracy",
76     feature = "type-check"
77 )))]
78 pub use empty_impl::*;