blob: bfefc37e4ca2785d40a798bd75b638c3f11d0486 [file]
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// IMPORTANT: This file should only ever be modified by modifying the
// corresponding .proto file and then running
// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root
// directory.
// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_INTERNED_DATA_INTERNED_DATA_PROTO_H_
#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_INTERNED_DATA_INTERNED_DATA_PROTO_H_
#include <stddef.h>
#include <stdint.h>
#include "perfetto/protozero/field_writer.h"
#include "perfetto/protozero/message.h"
#include "perfetto/protozero/packed_repeated_fields.h"
#include "perfetto/protozero/proto_decoder.h"
#include "perfetto/protozero/proto_utils.h"
namespace perfetto {
namespace protos {
namespace pbzero {
class Callstack;
class Frame;
class InternedString;
class Mapping;
class InternedData_Decoder : public ::protozero::TypedProtoDecoder<
/*MAX_FIELD_ID=*/19,
/*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
public:
InternedData_Decoder(const uint8_t* data, size_t len)
: TypedProtoDecoder(data, len) {}
explicit InternedData_Decoder(const std::string& raw)
: TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()),
raw.size()) {}
explicit InternedData_Decoder(const ::protozero::ConstBytes& raw)
: TypedProtoDecoder(raw.data, raw.size) {}
bool has_mapping_paths() const { return at<17>().valid(); }
::protozero::RepeatedFieldIterator<::protozero::ConstBytes> mapping_paths()
const {
return GetRepeated<::protozero::ConstBytes>(17);
}
bool has_function_names() const { return at<5>().valid(); }
::protozero::RepeatedFieldIterator<::protozero::ConstBytes> function_names()
const {
return GetRepeated<::protozero::ConstBytes>(5);
}
bool has_mappings() const { return at<19>().valid(); }
::protozero::RepeatedFieldIterator<::protozero::ConstBytes> mappings() const {
return GetRepeated<::protozero::ConstBytes>(19);
}
bool has_frames() const { return at<6>().valid(); }
::protozero::RepeatedFieldIterator<::protozero::ConstBytes> frames() const {
return GetRepeated<::protozero::ConstBytes>(6);
}
bool has_callstacks() const { return at<7>().valid(); }
::protozero::RepeatedFieldIterator<::protozero::ConstBytes> callstacks()
const {
return GetRepeated<::protozero::ConstBytes>(7);
}
};
class InternedData : public ::protozero::Message {
public:
using Decoder = InternedData_Decoder;
enum : int32_t {
kMappingPathsFieldNumber = 17,
kFunctionNamesFieldNumber = 5,
kMappingsFieldNumber = 19,
kFramesFieldNumber = 6,
kCallstacksFieldNumber = 7,
};
static constexpr const char* GetName() {
return ".perfetto.protos.InternedData";
}
using FieldMetadata_MappingPaths = ::protozero::proto_utils::FieldMetadata<
17,
::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
::protozero::proto_utils::ProtoSchemaType::kMessage,
InternedString,
InternedData>;
static constexpr FieldMetadata_MappingPaths kMappingPaths{};
template <typename T = InternedString>
T* add_mapping_paths() {
return BeginNestedMessage<T>(17);
}
using FieldMetadata_FunctionNames = ::protozero::proto_utils::FieldMetadata<
5,
::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
::protozero::proto_utils::ProtoSchemaType::kMessage,
InternedString,
InternedData>;
static constexpr FieldMetadata_FunctionNames kFunctionNames{};
template <typename T = InternedString>
T* add_function_names() {
return BeginNestedMessage<T>(5);
}
using FieldMetadata_Mappings = ::protozero::proto_utils::FieldMetadata<
19,
::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
::protozero::proto_utils::ProtoSchemaType::kMessage,
Mapping,
InternedData>;
static constexpr FieldMetadata_Mappings kMappings{};
template <typename T = Mapping>
T* add_mappings() {
return BeginNestedMessage<T>(19);
}
using FieldMetadata_Frames = ::protozero::proto_utils::FieldMetadata<
6,
::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
::protozero::proto_utils::ProtoSchemaType::kMessage,
Frame,
InternedData>;
static constexpr FieldMetadata_Frames kFrames{};
template <typename T = Frame>
T* add_frames() {
return BeginNestedMessage<T>(6);
}
using FieldMetadata_Callstacks = ::protozero::proto_utils::FieldMetadata<
7,
::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
::protozero::proto_utils::ProtoSchemaType::kMessage,
Callstack,
InternedData>;
static constexpr FieldMetadata_Callstacks kCallstacks{};
template <typename T = Callstack>
T* add_callstacks() {
return BeginNestedMessage<T>(7);
}
};
} // namespace pbzero
} // namespace protos
} // namespace perfetto
#endif // Include guard.