mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
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:
parent
77bdcef80c
commit
2c20225e23
@ -93,6 +93,11 @@ struct MarkerTypeSerialization {
|
||||
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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user