зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data. It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it. Differential Revision: https://phabricator.services.mozilla.com/D87252
This commit is contained in:
Родитель
77bdcef80c
Коммит
2c20225e23
|
@ -93,6 +93,11 @@ struct MarkerTypeSerialization {
|
||||||
std::tuple_element_t<i, StreamFunctionUserParametersTuple>;
|
std::tuple_element_t<i, StreamFunctionUserParametersTuple>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct MarkerTypeSerialization<::mozilla::baseprofiler::markers::NoPayload> {
|
||||||
|
// Nothing! NoPayload has special handling avoiding payload work.
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace mozilla::base_profiler_markers_detail
|
} // namespace mozilla::base_profiler_markers_detail
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
|
@ -633,6 +633,14 @@ MarkerOptions MarkerCategory::WithOptions(Options&&... aOptions) const {
|
||||||
|
|
||||||
} // namespace mozilla
|
} // 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 // MOZ_GECKO_PROFILER
|
||||||
|
|
||||||
#endif // BaseProfilerMarkersPrerequisites_h
|
#endif // BaseProfilerMarkersPrerequisites_h
|
||||||
|
|
|
@ -17,6 +17,14 @@
|
||||||
|
|
||||||
#ifdef MOZ_GECKO_PROFILER
|
#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 // MOZ_GECKO_PROFILER
|
||||||
|
|
||||||
#endif // ProfilerMarkersPrerequisites_h
|
#endif // ProfilerMarkersPrerequisites_h
|
||||||
|
|
Загрузка…
Ссылка в новой задаче