template <uint32_t... kFieldIds>

class SelectiveDecodeMask

Defined at line 334 of file ../../third_party/perfetto/include/perfetto/protozero/proto_decoder.h

Allowlist for selective decoding, built at compile time from the field ids

given as template arguments and sized automatically to the highest of them.

The mask does not need to match the decoder's MAX_FIELD_ID: the selective

constructor caps the decoder's dense window at |kMaxFieldId|, so ids above

it simply spill and the mask is never read beyond its end.

Usage:

static constexpr SelectiveDecodeMask

<TracePacket

::kTimestampFieldNumber,

TracePacket::kInternedDataFieldNumber>

kMask{};

SelectiveTypedProtoDecoder

<TypedProtoDecoder

<MAX

_FIELD_ID>> decoder(

data, size, kMask);

for (const Field

&

f : decoder.unknown_fields()) { ... }

Public Members

static const uint32_t kMaxFieldId

Public Methods

void SelectiveDecodeMask<kFieldIds...> ()

Defined at line 339 of file ../../third_party/perfetto/include/perfetto/protozero/proto_decoder.h

const uint64_t * data ()

Defined at line 343 of file ../../third_party/perfetto/include/perfetto/protozero/proto_decoder.h

bool contains (uint32_t id)

True if |id| is one of the whitelisted kFieldIds.

Defined at line 346 of file ../../third_party/perfetto/include/perfetto/protozero/proto_decoder.h