Namespaces
Enumerations
enum BackendType : uint32_t
| Name | Value | Comments |
|---|---|---|
| kUnspecifiedBackend | 0 | -- |
| kInProcessBackend | 1 << 0 |
Connects to a previously-initialized perfetto tracing backend for |
| kSystemBackend | 1 << 1 |
Connects to the system tracing service (e.g. on Linux/Android/Mac uses a |
| kCustomBackend | 1 << 2 |
Used to provide a custom IPC transport to connect to the service. |
Defined at line 24 of file ../../third_party/perfetto/include/perfetto/tracing/backend_type.h
enum class BufferExhaustedPolicy
| Name | Value | Comments |
|---|---|---|
| kStall | 0 |
SharedMemoryArbiterImpl::GetNewChunk() will stall if no free SMB chunk is |
| kDrop | 1 |
SharedMemoryArbiterImpl::GetNewChunk() will return an invalid chunk if no |
| kStallThenDrop | 2 |
SharedMemoryArbiterImpl::GetNewChunk() will stall if no free SMB chunk is |
| kDefault | kStall |
Deprecated alias. Do not use. |
Determines how SharedMemoryArbiterImpl::GetNewChunk() behaves when no free
chunks are available.
Defined at line 24 of file ../../third_party/perfetto/include/perfetto/tracing/buffer_exhausted_policy.h
enum ProtocolAbiVersion : uint32_t
| Name | Value | Comments |
|---|---|---|
| kProtocolAbiV1 | 1 << 0 |
The original protocol. |
| kProtocolAbiV2 | 1 << 1 |
Tracing v2. It is still under development and its ABI is not stable yet.
The producer allocates a ring buffer: |
A shared memory layout and the operations that send its data to the service.
Each version is independent. Support for v2 does not imply support for v1.
Each value is a single bit. Peers exchange and store a set of versions as a
uint32_t mask, e.g. kProtocolAbiV1 | kProtocolAbiV2.
A new version must take the next unused bit: 1
<
<
2, then 1
<
<
3.
At connection setup:
- The producer sends the mask of versions it supports in
InitializeConnection.
- The service returns the mask of versions that both sides support.
- An old peer sends no mask. This means v1 only.
- No common version means the connection fails.
The proto enum in protos/perfetto/ipc/producer_port.proto has the same
values.
The common mask stays fixed for the connection. A writer must use one of
these versions that its data source config and target buffer permit.
A layout change that an old peer cannot read needs a new version.
Defined at line 72 of file ../../third_party/perfetto/include/perfetto/ext/tracing/core/tracing_service.h
Records
-
class BigInternedDataTraits -
class Category -
class ClientIdentity -
class ConsoleColor -
class ConsoleInterceptor -
class Consumer -
class ConsumerEndpoint -
class CounterTrack -
class DataSource -
class DataSourceBase -
class DataSourceHelper -
class DebugAnnotation -
class DefaultDataSourceTraits -
class DynamicCategory -
class DynamicString -
class EventContext -
class FlushFlags -
class HashedInternedDataTraits -
class Interceptor -
class InterceptorBase -
class InterceptorContext -
class ListenEndpoint -
class LockedHandle -
class NamedTrack -
class Platform -
class PlatformThreadLocalObject -
class ProcessTrack -
class Producer -
class ProducerEndpoint -
class ProducerIPCClient -
class RelayEndpoint -
class ServiceIPCHost -
class SharedMemory -
class SharedMemoryABI -
class SharedMemoryArbiter -
class Slice -
class SmallInternedDataTraits -
class StartupTracingSession -
class StateTrack -
class StaticString -
class ThreadTrack -
class TraceFormatTraits -
class TraceFormatTraits<T, typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_signed<T>::value>::type> -
class TraceFormatTraits<T, typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_unsigned<T>::value>::type> -
class TraceFormatTraits<bool, void> -
class TraceFormatTraits<T, typename std::enable_if<std::is_floating_point<T>::value>::type> -
class TraceFormatTraits<T, typename std::enable_if< std::is_enum<T>::value && std::is_signed< typename internal::safe_underlying_type<T>::type>::value>::type> -
class TraceFormatTraits<T, typename std::enable_if< std::is_enum<T>::value && std::is_unsigned< typename internal::safe_underlying_type<T>::type>::value>::type> -
class TraceFormatTraits<const char *, void> -
class TraceFormatTraits<char[], void> -
class TraceFormatTraits<char[N]> -
class TraceFormatTraits<perfetto::StaticString, void> -
class TraceFormatTraits<perfetto::DynamicString, void> -
class TraceFormatTraits<std::string, void> -
class TraceFormatTraits<std::string_view, void> -
class TraceFormatTraits<void *, void> -
class TraceFormatTraits<const void *, void> -
class TraceFormatTraits<std::unique_ptr<T>, check_traced_value_support_t<T>> -
class TraceFormatTraits<T*, check_traced_value_support_t<T>> -
class TraceFormatTraits<std::nullptr_t, void> -
class TracePacket -
class TraceTimestamp -
class TraceTimestampTraits -
class TraceTimestampTraits<unsigned long> -
class TraceTimestampTraits<perfetto::TraceTimestamp> -
class TraceWriter -
class TraceWriterBase -
class TracedArray -
class TracedDictionary -
class TracedProto -
class TracedProtoTest -
class TracedValue -
class Tracing -
class TracingBackend -
class TracingConsumerBackend -
class TracingError -
class TracingInitArgs -
class TracingMuxerImpl -
class TracingPolicy -
class TracingProducerBackend -
class TracingService -
class TracingServiceInitOpts -
class TracingSession -
class Track -
class TrackEventInternedDataIndex -
class TrackEventSessionObserver -
class TrackEventStateTracker -
class TrackEventTlsStateUserData -
class check_traced_proto_support -
class check_traced_proto_support<MessageType, ValueType, Result, check_traced_proto_support_t<MessageType, ValueType, Result>> -
class check_traced_value_support -
class check_traced_value_support<T, Result, check_traced_value_support_t<T, Result>>
Functions
-
const char * GetConsumerSocket () -
TraceConfig::TriggerConfig::TriggerMode GetTriggerMode (const TraceConfig & cfg)Defined at line 30 of file ../../third_party/perfetto/include/perfetto/tracing/core/trace_config.h
-
ProducerAndWriterID MkProducerAndWriterID (ProducerID p, WriterID w)Defined at line 48 of file ../../third_party/perfetto/include/perfetto/ext/tracing/core/basic_types.h
-
void GetProducerAndWriterID (ProducerAndWriterIDx,ProducerID *p,WriterID *w)Defined at line 55 of file ../../third_party/perfetto/include/perfetto/ext/tracing/core/basic_types.h
-
std::vector<std::string> TokenizeProducerSockets (const char * producer_socket_names)This function is used for tokenize the |producer_socket_names| string into
multiple producer socket names.
-
const char * GetProducerSocket () -
std::string GetRelaySocket ()Optionally returns the relay socket name. The relay socket is used
for forwarding the IPC messages between the local producers and the remote
tracing service.
-
template <typename MessageType,typename FieldMetadataType,typename ValueType>void WriteTracedProtoField (TracedProto<MessageType> &message,FieldMetadataType,ValueType &&value)Defined at line 398 of file ../../third_party/perfetto/include/perfetto/tracing/traced_proto.h
-
template <typename T>void WriteIntoTracedValue (TracedValue context, T && value)A type T is writable into a trace if one of the following is defined:
- T::WriteIntoTracedValue(TracedValue) const
- T::WriteIntoTrace(TracedValue) const
- perfetto::TraceFormatTraits
<T
>::WriteIntoTracedValue(TracedValue, const T
&
)
- perfetto::TraceFormatTraits
<T
>::WriteIntoTrace(TracedValue, const T
&
)
The member forms are preferred for code that can depend on perfetto directly;
the TraceFormatTraits forms are for types owned by code that cannot. See the
examples at the top of this file. Primitives, strings, pointers, STL
containers and protozero enums are supported out of the box.
If the static_assert below fires, the most common causes are:
- No conversion is defined for T.
- The conversion method is not const, or does not take TracedValue by value.
- The method name is misspelled: only WriteIntoTrace and WriteIntoTracedValue
are recognised.
- The TraceFormatTraits
<T
> specialisation is not in the perfetto namespace.
- The header defining the conversion is not included at the TRACE_EVENT call
site.
- T is a pointer or smart pointer to a type that is itself not writable.
- T is a plain enum with no conversion (only protozero enums are automatic).
Defined at line 497 of file ../../third_party/perfetto/include/perfetto/tracing/traced_value.h
-
template <typename MessageType, typename T>void WriteIntoTracedProto (TracedProto<MessageType> context, T && value)Defined at line 382 of file ../../third_party/perfetto/include/perfetto/tracing/traced_proto.h
-
template <typename T>typename std::enable_if<internal::has_traced_value_support<T>::value>::type WriteIntoTracedValueWithFallback (TracedValuecontext,T &&value,const std::string &)Helpers to write a given value into TracedValue even if the given type
doesn't support conversion (in which case the provided fallback should be
used). Useful for automatically generating conversions for autogenerated
code, but otherwise shouldn't be used as non-autogenerated code is expected
to define WriteIntoTracedValue convertor.
See WriteWithFallback test in traced_value_unittest.cc for a concrete
example.
Defined at line 519 of file ../../third_party/perfetto/include/perfetto/tracing/traced_value.h
-
template <typename T>typename std::enable_if<!internal::has_traced_value_support<T>::value>::type WriteIntoTracedValueWithFallback (TracedValuecontext,T &&,const std::string &fallback)Defined at line 527 of file ../../third_party/perfetto/include/perfetto/tracing/traced_value.h