class TraceProvider
Defined at line 175 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h
Convenience RAII wrapper for creating and destroying a trace provider.
Public Methods
ProviderConfig GetProviderConfig ()
Returns the most recent provider config passed to `Initialize`.
Defined at line 126 of file ../../zircon/system/ulib/trace-provider/provider_impl.cc
void SetGetKnownCategoriesCallback (GetKnownCategoriesCallback callback)
Sets a callback that will be used by `TraceProvider` to collect a list of known categories from
the code that created the provider in order to return them from the fidl `GetKnownCategories`
method. If this value is never set, then the provider defaults to having `GetKnownCategories`
return the list of all categories registered at compile time in the current process. This
callback is an affordance for instances where the categories logged by the provider might not
be captured in the compile-time list. These include meta-providers such as `perfetto-bridge`
and providers from languages other than C++.
Defined at line 132 of file ../../zircon/system/ulib/trace-provider/provider_impl.cc
bool CreateSynchronously (zx::channel to_service, async_dispatcher_t * dispatcher, const char * name, std::unique_ptr<TraceProvider> * out_provider, bool * out_already_started)
Create a trace provider synchronously, and return an indicator of
whether tracing has started already in |*out_already_started|.
Returns a boolean indicating success.
This is done with a factory function because it's more complex than
the basic constructor.
Defined at line 182 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h
void TraceProvider (zx::channel to_service, async_dispatcher_t * dispatcher)
Creates a trace provider.
Defined at line 194 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h
void TraceProvider (zx::channel to_service, async_dispatcher_t * dispatcher, const char * name)
Creates a trace provider.
Defined at line 198 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h
void ~TraceProvider ()
Destroys a trace provider.
Defined at line 202 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h
bool is_valid ()
Returns true if the trace provider was created successfully.
Defined at line 208 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h
Protected Methods
void TraceProvider (trace_provider_t * provider)
Defined at line 223 of file ../../zircon/system/ulib/trace-provider/include/lib/trace-provider/provider.h