mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Remove the old profiler label frames code in the servo codebase and replace it with the new API
Differential Revision: https://phabricator.services.mozilla.com/D120795
This commit is contained in:
parent
9e33a154fd
commit
5a9fae3fb5
6 changed files with 5 additions and 109 deletions
|
@ -105,35 +105,6 @@ macro_rules! define_keyword_type {
|
|||
};
|
||||
}
|
||||
|
||||
/// Place a Gecko profiler label on the stack.
|
||||
///
|
||||
/// The `label_type` argument must be the name of a variant of `ProfilerLabel`.
|
||||
#[cfg(feature = "gecko_profiler")]
|
||||
#[macro_export]
|
||||
macro_rules! profiler_label {
|
||||
($label_type:ident) => {
|
||||
let mut _profiler_label =
|
||||
::std::mem::MaybeUninit::<$crate::gecko_bindings::structs::AutoProfilerLabel>::uninit();
|
||||
let _profiler_label = if $crate::gecko::profiler::profiler_is_active() {
|
||||
unsafe {
|
||||
Some($crate::gecko::profiler::AutoProfilerLabel::new(
|
||||
&mut _profiler_label,
|
||||
$crate::gecko::profiler::ProfilerLabel::$label_type,
|
||||
))
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/// No-op when the Gecko profiler is not available.
|
||||
#[cfg(not(feature = "gecko_profiler"))]
|
||||
#[macro_export]
|
||||
macro_rules! profiler_label {
|
||||
($label_type:ident) => {};
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
macro_rules! local_name {
|
||||
($s:tt) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue