diff --git a/mozglue/baseprofiler/public/BaseProfilerMarkersDetail.h b/mozglue/baseprofiler/public/BaseProfilerMarkersDetail.h index 69349b05ce5f..61773595c619 100644 --- a/mozglue/baseprofiler/public/BaseProfilerMarkersDetail.h +++ b/mozglue/baseprofiler/public/BaseProfilerMarkersDetail.h @@ -93,6 +93,11 @@ struct MarkerTypeSerialization { std::tuple_element_t; }; +template <> +struct MarkerTypeSerialization<::mozilla::baseprofiler::markers::NoPayload> { + // Nothing! NoPayload has special handling avoiding payload work. +}; + } // namespace mozilla::base_profiler_markers_detail namespace mozilla { diff --git a/mozglue/baseprofiler/public/BaseProfilerMarkersPrerequisites.h b/mozglue/baseprofiler/public/BaseProfilerMarkersPrerequisites.h index 420120601d3f..3b711a3e1c33 100644 --- a/mozglue/baseprofiler/public/BaseProfilerMarkersPrerequisites.h +++ b/mozglue/baseprofiler/public/BaseProfilerMarkersPrerequisites.h @@ -633,6 +633,14 @@ MarkerOptions MarkerCategory::WithOptions(Options&&... aOptions) const { } // namespace mozilla +namespace mozilla::baseprofiler::markers { + +// Default marker payload types, with no extra information, not even a marker +// type and payload. This is intended for label-only markers. +struct NoPayload final {}; + +} // namespace mozilla::baseprofiler::markers + #endif // MOZ_GECKO_PROFILER #endif // BaseProfilerMarkersPrerequisites_h diff --git a/tools/profiler/public/ProfilerMarkersPrerequisites.h b/tools/profiler/public/ProfilerMarkersPrerequisites.h index 599a282b798d..ad300de8570d 100644 --- a/tools/profiler/public/ProfilerMarkersPrerequisites.h +++ b/tools/profiler/public/ProfilerMarkersPrerequisites.h @@ -17,6 +17,14 @@ #ifdef MOZ_GECKO_PROFILER +namespace profilermarkers { + +// Default marker payload types, with no extra information, not even a marker +// type and payload. This is intended for label-only markers. +using NoPayload = ::mozilla::baseprofiler::markers::NoPayload; + +} // namespace profilermarkers + #endif // MOZ_GECKO_PROFILER #endif // ProfilerMarkersPrerequisites_h