blob: f7219433f01df51627379013d087a09db2324906 [file] [log] [blame]
// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROCESS_STATS_PROCESS_STATS_CONFIG_PROTO_H_
#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROCESS_STATS_PROCESS_STATS_CONFIG_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 {
enum ProcessStatsConfig_Quirks : int32_t;
enum ProcessStatsConfig_Quirks : int32_t {
ProcessStatsConfig_Quirks_QUIRKS_UNSPECIFIED = 0,
ProcessStatsConfig_Quirks_DISABLE_INITIAL_DUMP = 1,
ProcessStatsConfig_Quirks_DISABLE_ON_DEMAND = 2,
};
const ProcessStatsConfig_Quirks ProcessStatsConfig_Quirks_MIN = ProcessStatsConfig_Quirks_QUIRKS_UNSPECIFIED;
const ProcessStatsConfig_Quirks ProcessStatsConfig_Quirks_MAX = ProcessStatsConfig_Quirks_DISABLE_ON_DEMAND;
class ProcessStatsConfig_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/8, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
public:
ProcessStatsConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
explicit ProcessStatsConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
explicit ProcessStatsConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
bool has_quirks() const { return at<1>().valid(); }
::protozero::RepeatedFieldIterator<int32_t> quirks() const { return GetRepeated<int32_t>(1); }
bool has_scan_all_processes_on_start() const { return at<2>().valid(); }
bool scan_all_processes_on_start() const { return at<2>().as_bool(); }
bool has_record_thread_names() const { return at<3>().valid(); }
bool record_thread_names() const { return at<3>().as_bool(); }
bool has_proc_stats_poll_ms() const { return at<4>().valid(); }
uint32_t proc_stats_poll_ms() const { return at<4>().as_uint32(); }
bool has_proc_stats_cache_ttl_ms() const { return at<6>().valid(); }
uint32_t proc_stats_cache_ttl_ms() const { return at<6>().as_uint32(); }
bool has_record_thread_time_in_state() const { return at<7>().valid(); }
bool record_thread_time_in_state() const { return at<7>().as_bool(); }
bool has_thread_time_in_state_cache_size() const { return at<8>().valid(); }
uint32_t thread_time_in_state_cache_size() const { return at<8>().as_uint32(); }
};
class ProcessStatsConfig : public ::protozero::Message {
public:
using Decoder = ProcessStatsConfig_Decoder;
enum : int32_t {
kQuirksFieldNumber = 1,
kScanAllProcessesOnStartFieldNumber = 2,
kRecordThreadNamesFieldNumber = 3,
kProcStatsPollMsFieldNumber = 4,
kProcStatsCacheTtlMsFieldNumber = 6,
kRecordThreadTimeInStateFieldNumber = 7,
kThreadTimeInStateCacheSizeFieldNumber = 8,
};
using Quirks = ::perfetto::protos::pbzero::ProcessStatsConfig_Quirks;
static const Quirks QUIRKS_UNSPECIFIED = ProcessStatsConfig_Quirks_QUIRKS_UNSPECIFIED;
static const Quirks DISABLE_INITIAL_DUMP = ProcessStatsConfig_Quirks_DISABLE_INITIAL_DUMP;
static const Quirks DISABLE_ON_DEMAND = ProcessStatsConfig_Quirks_DISABLE_ON_DEMAND;
using FieldMetadata_Quirks =
::protozero::proto_utils::FieldMetadata<
1,
::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
::protozero::proto_utils::ProtoSchemaType::kEnum,
::perfetto::protos::pbzero::ProcessStatsConfig_Quirks,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_Quirks kQuirks() { return {}; }
void add_quirks(::perfetto::protos::pbzero::ProcessStatsConfig_Quirks value) {
static constexpr uint32_t field_id = FieldMetadata_Quirks::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kEnum>
::Append(*this, field_id, value);
}
using FieldMetadata_ScanAllProcessesOnStart =
::protozero::proto_utils::FieldMetadata<
2,
::protozero::proto_utils::RepetitionType::kNotRepeated,
::protozero::proto_utils::ProtoSchemaType::kBool,
bool,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_ScanAllProcessesOnStart kScanAllProcessesOnStart() { return {}; }
void set_scan_all_processes_on_start(bool value) {
static constexpr uint32_t field_id = FieldMetadata_ScanAllProcessesOnStart::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kBool>
::Append(*this, field_id, value);
}
using FieldMetadata_RecordThreadNames =
::protozero::proto_utils::FieldMetadata<
3,
::protozero::proto_utils::RepetitionType::kNotRepeated,
::protozero::proto_utils::ProtoSchemaType::kBool,
bool,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_RecordThreadNames kRecordThreadNames() { return {}; }
void set_record_thread_names(bool value) {
static constexpr uint32_t field_id = FieldMetadata_RecordThreadNames::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kBool>
::Append(*this, field_id, value);
}
using FieldMetadata_ProcStatsPollMs =
::protozero::proto_utils::FieldMetadata<
4,
::protozero::proto_utils::RepetitionType::kNotRepeated,
::protozero::proto_utils::ProtoSchemaType::kUint32,
uint32_t,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_ProcStatsPollMs kProcStatsPollMs() { return {}; }
void set_proc_stats_poll_ms(uint32_t value) {
static constexpr uint32_t field_id = FieldMetadata_ProcStatsPollMs::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kUint32>
::Append(*this, field_id, value);
}
using FieldMetadata_ProcStatsCacheTtlMs =
::protozero::proto_utils::FieldMetadata<
6,
::protozero::proto_utils::RepetitionType::kNotRepeated,
::protozero::proto_utils::ProtoSchemaType::kUint32,
uint32_t,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_ProcStatsCacheTtlMs kProcStatsCacheTtlMs() { return {}; }
void set_proc_stats_cache_ttl_ms(uint32_t value) {
static constexpr uint32_t field_id = FieldMetadata_ProcStatsCacheTtlMs::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kUint32>
::Append(*this, field_id, value);
}
using FieldMetadata_RecordThreadTimeInState =
::protozero::proto_utils::FieldMetadata<
7,
::protozero::proto_utils::RepetitionType::kNotRepeated,
::protozero::proto_utils::ProtoSchemaType::kBool,
bool,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_RecordThreadTimeInState kRecordThreadTimeInState() { return {}; }
void set_record_thread_time_in_state(bool value) {
static constexpr uint32_t field_id = FieldMetadata_RecordThreadTimeInState::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kBool>
::Append(*this, field_id, value);
}
using FieldMetadata_ThreadTimeInStateCacheSize =
::protozero::proto_utils::FieldMetadata<
8,
::protozero::proto_utils::RepetitionType::kNotRepeated,
::protozero::proto_utils::ProtoSchemaType::kUint32,
uint32_t,
ProcessStatsConfig>;
// Ceci n'est pas une pipe.
// This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
// type (and users are expected to use it as such, hence kCamelCase name).
// It is declared as a function to keep protozero bindings header-only as
// inline constexpr variables are not available until C++17 (while inline
// functions are).
// TODO(altimin): Use inline variable instead after adopting C++17.
static constexpr FieldMetadata_ThreadTimeInStateCacheSize kThreadTimeInStateCacheSize() { return {}; }
void set_thread_time_in_state_cache_size(uint32_t value) {
static constexpr uint32_t field_id = FieldMetadata_ThreadTimeInStateCacheSize::kFieldId;
// Call the appropriate protozero::Message::Append(field_id, ...)
// method based on the type of the field.
::protozero::internal::FieldWriter<
::protozero::proto_utils::ProtoSchemaType::kUint32>
::Append(*this, field_id, value);
}
};
} // Namespace.
} // Namespace.
} // Namespace.
#endif // Include guard.