template <typename DerivedDataSource, typename DataSourceTraits = DefaultDataSourceTraits>

struct DataSourceHelper

Defined at line 253 of file ../../third_party/perfetto/include/perfetto/tracing/data_source.h

Holds the DataSourceType for a DataSource, accessed by Trace()'s fastpaths.

Lives on a separate helper (not as a static member on DataSource) so

per-component export macros can redefine it, and because MSVC/clang-cl reject

the static-data-member design with a redefinition error (C2086) and an

explicit-specialization-after-instantiation error. See b/280777748.

type() must be defined out-of-line: defining it in the class body makes it

implicitly inline ([dcl.inline]/4), which MSVC then propagates to every

explicit specialization from PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS and

silently drops the body (C4506), so callers fail to link with an unresolved

external symbol (LNK2019). GCC/Clang are unaffected.

Public Methods

internal::DataSourceType & type ()

Defined at line 257 of file ../../third_party/perfetto/include/perfetto/tracing/data_source.h