blob: d8e79e18fe5ac7844c790657c37a351848493382 [file] [log] [blame]
// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin
#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_PERF_EVENT_CONFIG_PROTO_CPP_H_
#define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_PERF_EVENT_CONFIG_PROTO_CPP_H_
#include <stdint.h>
#include <bitset>
#include <vector>
#include <string>
#include <type_traits>
#include "perfetto/protozero/cpp_message_obj.h"
#include "perfetto/protozero/copyable_ptr.h"
#include "perfetto/base/export.h"
namespace perfetto {
namespace protos {
namespace gen {
class PerfEventConfig;
class PerfEventConfig_CallstackSampling;
class PerfEventConfig_Scope;
class PerfEvents_Timebase;
class PerfEvents_RawEvent;
class PerfEvents_Tracepoint;
enum PerfEvents_Counter : int;
} // namespace perfetto
} // namespace protos
} // namespace gen
namespace protozero {
class Message;
} // namespace protozero
namespace perfetto {
namespace protos {
namespace gen {
class PERFETTO_EXPORT PerfEventConfig : public ::protozero::CppMessageObj {
public:
using CallstackSampling = PerfEventConfig_CallstackSampling;
using Scope = PerfEventConfig_Scope;
enum FieldNumbers {
kTimebaseFieldNumber = 15,
kCallstackSamplingFieldNumber = 16,
kRingBufferReadPeriodMsFieldNumber = 8,
kRingBufferPagesFieldNumber = 3,
kMaxEnqueuedFootprintKbFieldNumber = 17,
kMaxDaemonMemoryKbFieldNumber = 13,
kRemoteDescriptorTimeoutMsFieldNumber = 9,
kUnwindStateClearPeriodMsFieldNumber = 10,
kTargetInstalledByFieldNumber = 18,
kAllCpusFieldNumber = 1,
kSamplingFrequencyFieldNumber = 2,
kKernelFramesFieldNumber = 12,
kTargetPidFieldNumber = 4,
kTargetCmdlineFieldNumber = 5,
kExcludePidFieldNumber = 6,
kExcludeCmdlineFieldNumber = 7,
kAdditionalCmdlineCountFieldNumber = 11,
};
PerfEventConfig();
~PerfEventConfig() override;
PerfEventConfig(PerfEventConfig&&) noexcept;
PerfEventConfig& operator=(PerfEventConfig&&);
PerfEventConfig(const PerfEventConfig&);
PerfEventConfig& operator=(const PerfEventConfig&);
bool operator==(const PerfEventConfig&) const;
bool operator!=(const PerfEventConfig& other) const { return !(*this == other); }
bool ParseFromArray(const void*, size_t) override;
std::string SerializeAsString() const override;
std::vector<uint8_t> SerializeAsArray() const override;
void Serialize(::protozero::Message*) const;
bool has_timebase() const { return _has_field_[15]; }
const PerfEvents_Timebase& timebase() const { return *timebase_; }
PerfEvents_Timebase* mutable_timebase() { _has_field_.set(15); return timebase_.get(); }
bool has_callstack_sampling() const { return _has_field_[16]; }
const PerfEventConfig_CallstackSampling& callstack_sampling() const { return *callstack_sampling_; }
PerfEventConfig_CallstackSampling* mutable_callstack_sampling() { _has_field_.set(16); return callstack_sampling_.get(); }
bool has_ring_buffer_read_period_ms() const { return _has_field_[8]; }
uint32_t ring_buffer_read_period_ms() const { return ring_buffer_read_period_ms_; }
void set_ring_buffer_read_period_ms(uint32_t value) { ring_buffer_read_period_ms_ = value; _has_field_.set(8); }
bool has_ring_buffer_pages() const { return _has_field_[3]; }
uint32_t ring_buffer_pages() const { return ring_buffer_pages_; }
void set_ring_buffer_pages(uint32_t value) { ring_buffer_pages_ = value; _has_field_.set(3); }
bool has_max_enqueued_footprint_kb() const { return _has_field_[17]; }
uint64_t max_enqueued_footprint_kb() const { return max_enqueued_footprint_kb_; }
void set_max_enqueued_footprint_kb(uint64_t value) { max_enqueued_footprint_kb_ = value; _has_field_.set(17); }
bool has_max_daemon_memory_kb() const { return _has_field_[13]; }
uint32_t max_daemon_memory_kb() const { return max_daemon_memory_kb_; }
void set_max_daemon_memory_kb(uint32_t value) { max_daemon_memory_kb_ = value; _has_field_.set(13); }
bool has_remote_descriptor_timeout_ms() const { return _has_field_[9]; }
uint32_t remote_descriptor_timeout_ms() const { return remote_descriptor_timeout_ms_; }
void set_remote_descriptor_timeout_ms(uint32_t value) { remote_descriptor_timeout_ms_ = value; _has_field_.set(9); }
bool has_unwind_state_clear_period_ms() const { return _has_field_[10]; }
uint32_t unwind_state_clear_period_ms() const { return unwind_state_clear_period_ms_; }
void set_unwind_state_clear_period_ms(uint32_t value) { unwind_state_clear_period_ms_ = value; _has_field_.set(10); }
const std::vector<std::string>& target_installed_by() const { return target_installed_by_; }
std::vector<std::string>* mutable_target_installed_by() { return &target_installed_by_; }
int target_installed_by_size() const { return static_cast<int>(target_installed_by_.size()); }
void clear_target_installed_by() { target_installed_by_.clear(); }
void add_target_installed_by(std::string value) { target_installed_by_.emplace_back(value); }
std::string* add_target_installed_by() { target_installed_by_.emplace_back(); return &target_installed_by_.back(); }
bool has_all_cpus() const { return _has_field_[1]; }
bool all_cpus() const { return all_cpus_; }
void set_all_cpus(bool value) { all_cpus_ = value; _has_field_.set(1); }
bool has_sampling_frequency() const { return _has_field_[2]; }
uint32_t sampling_frequency() const { return sampling_frequency_; }
void set_sampling_frequency(uint32_t value) { sampling_frequency_ = value; _has_field_.set(2); }
bool has_kernel_frames() const { return _has_field_[12]; }
bool kernel_frames() const { return kernel_frames_; }
void set_kernel_frames(bool value) { kernel_frames_ = value; _has_field_.set(12); }
const std::vector<int32_t>& target_pid() const { return target_pid_; }
std::vector<int32_t>* mutable_target_pid() { return &target_pid_; }
int target_pid_size() const { return static_cast<int>(target_pid_.size()); }
void clear_target_pid() { target_pid_.clear(); }
void add_target_pid(int32_t value) { target_pid_.emplace_back(value); }
int32_t* add_target_pid() { target_pid_.emplace_back(); return &target_pid_.back(); }
const std::vector<std::string>& target_cmdline() const { return target_cmdline_; }
std::vector<std::string>* mutable_target_cmdline() { return &target_cmdline_; }
int target_cmdline_size() const { return static_cast<int>(target_cmdline_.size()); }
void clear_target_cmdline() { target_cmdline_.clear(); }
void add_target_cmdline(std::string value) { target_cmdline_.emplace_back(value); }
std::string* add_target_cmdline() { target_cmdline_.emplace_back(); return &target_cmdline_.back(); }
const std::vector<int32_t>& exclude_pid() const { return exclude_pid_; }
std::vector<int32_t>* mutable_exclude_pid() { return &exclude_pid_; }
int exclude_pid_size() const { return static_cast<int>(exclude_pid_.size()); }
void clear_exclude_pid() { exclude_pid_.clear(); }
void add_exclude_pid(int32_t value) { exclude_pid_.emplace_back(value); }
int32_t* add_exclude_pid() { exclude_pid_.emplace_back(); return &exclude_pid_.back(); }
const std::vector<std::string>& exclude_cmdline() const { return exclude_cmdline_; }
std::vector<std::string>* mutable_exclude_cmdline() { return &exclude_cmdline_; }
int exclude_cmdline_size() const { return static_cast<int>(exclude_cmdline_.size()); }
void clear_exclude_cmdline() { exclude_cmdline_.clear(); }
void add_exclude_cmdline(std::string value) { exclude_cmdline_.emplace_back(value); }
std::string* add_exclude_cmdline() { exclude_cmdline_.emplace_back(); return &exclude_cmdline_.back(); }
bool has_additional_cmdline_count() const { return _has_field_[11]; }
uint32_t additional_cmdline_count() const { return additional_cmdline_count_; }
void set_additional_cmdline_count(uint32_t value) { additional_cmdline_count_ = value; _has_field_.set(11); }
private:
::protozero::CopyablePtr<PerfEvents_Timebase> timebase_;
::protozero::CopyablePtr<PerfEventConfig_CallstackSampling> callstack_sampling_;
uint32_t ring_buffer_read_period_ms_{};
uint32_t ring_buffer_pages_{};
uint64_t max_enqueued_footprint_kb_{};
uint32_t max_daemon_memory_kb_{};
uint32_t remote_descriptor_timeout_ms_{};
uint32_t unwind_state_clear_period_ms_{};
std::vector<std::string> target_installed_by_;
bool all_cpus_{};
uint32_t sampling_frequency_{};
bool kernel_frames_{};
std::vector<int32_t> target_pid_;
std::vector<std::string> target_cmdline_;
std::vector<int32_t> exclude_pid_;
std::vector<std::string> exclude_cmdline_;
uint32_t additional_cmdline_count_{};
// Allows to preserve unknown protobuf fields for compatibility
// with future versions of .proto files.
std::string unknown_fields_;
std::bitset<19> _has_field_{};
};
class PERFETTO_EXPORT PerfEventConfig_CallstackSampling : public ::protozero::CppMessageObj {
public:
enum FieldNumbers {
kScopeFieldNumber = 1,
kKernelFramesFieldNumber = 2,
};
PerfEventConfig_CallstackSampling();
~PerfEventConfig_CallstackSampling() override;
PerfEventConfig_CallstackSampling(PerfEventConfig_CallstackSampling&&) noexcept;
PerfEventConfig_CallstackSampling& operator=(PerfEventConfig_CallstackSampling&&);
PerfEventConfig_CallstackSampling(const PerfEventConfig_CallstackSampling&);
PerfEventConfig_CallstackSampling& operator=(const PerfEventConfig_CallstackSampling&);
bool operator==(const PerfEventConfig_CallstackSampling&) const;
bool operator!=(const PerfEventConfig_CallstackSampling& other) const { return !(*this == other); }
bool ParseFromArray(const void*, size_t) override;
std::string SerializeAsString() const override;
std::vector<uint8_t> SerializeAsArray() const override;
void Serialize(::protozero::Message*) const;
bool has_scope() const { return _has_field_[1]; }
const PerfEventConfig_Scope& scope() const { return *scope_; }
PerfEventConfig_Scope* mutable_scope() { _has_field_.set(1); return scope_.get(); }
bool has_kernel_frames() const { return _has_field_[2]; }
bool kernel_frames() const { return kernel_frames_; }
void set_kernel_frames(bool value) { kernel_frames_ = value; _has_field_.set(2); }
private:
::protozero::CopyablePtr<PerfEventConfig_Scope> scope_;
bool kernel_frames_{};
// Allows to preserve unknown protobuf fields for compatibility
// with future versions of .proto files.
std::string unknown_fields_;
std::bitset<3> _has_field_{};
};
class PERFETTO_EXPORT PerfEventConfig_Scope : public ::protozero::CppMessageObj {
public:
enum FieldNumbers {
kTargetPidFieldNumber = 1,
kTargetCmdlineFieldNumber = 2,
kExcludePidFieldNumber = 3,
kExcludeCmdlineFieldNumber = 4,
kAdditionalCmdlineCountFieldNumber = 5,
};
PerfEventConfig_Scope();
~PerfEventConfig_Scope() override;
PerfEventConfig_Scope(PerfEventConfig_Scope&&) noexcept;
PerfEventConfig_Scope& operator=(PerfEventConfig_Scope&&);
PerfEventConfig_Scope(const PerfEventConfig_Scope&);
PerfEventConfig_Scope& operator=(const PerfEventConfig_Scope&);
bool operator==(const PerfEventConfig_Scope&) const;
bool operator!=(const PerfEventConfig_Scope& other) const { return !(*this == other); }
bool ParseFromArray(const void*, size_t) override;
std::string SerializeAsString() const override;
std::vector<uint8_t> SerializeAsArray() const override;
void Serialize(::protozero::Message*) const;
const std::vector<int32_t>& target_pid() const { return target_pid_; }
std::vector<int32_t>* mutable_target_pid() { return &target_pid_; }
int target_pid_size() const { return static_cast<int>(target_pid_.size()); }
void clear_target_pid() { target_pid_.clear(); }
void add_target_pid(int32_t value) { target_pid_.emplace_back(value); }
int32_t* add_target_pid() { target_pid_.emplace_back(); return &target_pid_.back(); }
const std::vector<std::string>& target_cmdline() const { return target_cmdline_; }
std::vector<std::string>* mutable_target_cmdline() { return &target_cmdline_; }
int target_cmdline_size() const { return static_cast<int>(target_cmdline_.size()); }
void clear_target_cmdline() { target_cmdline_.clear(); }
void add_target_cmdline(std::string value) { target_cmdline_.emplace_back(value); }
std::string* add_target_cmdline() { target_cmdline_.emplace_back(); return &target_cmdline_.back(); }
const std::vector<int32_t>& exclude_pid() const { return exclude_pid_; }
std::vector<int32_t>* mutable_exclude_pid() { return &exclude_pid_; }
int exclude_pid_size() const { return static_cast<int>(exclude_pid_.size()); }
void clear_exclude_pid() { exclude_pid_.clear(); }
void add_exclude_pid(int32_t value) { exclude_pid_.emplace_back(value); }
int32_t* add_exclude_pid() { exclude_pid_.emplace_back(); return &exclude_pid_.back(); }
const std::vector<std::string>& exclude_cmdline() const { return exclude_cmdline_; }
std::vector<std::string>* mutable_exclude_cmdline() { return &exclude_cmdline_; }
int exclude_cmdline_size() const { return static_cast<int>(exclude_cmdline_.size()); }
void clear_exclude_cmdline() { exclude_cmdline_.clear(); }
void add_exclude_cmdline(std::string value) { exclude_cmdline_.emplace_back(value); }
std::string* add_exclude_cmdline() { exclude_cmdline_.emplace_back(); return &exclude_cmdline_.back(); }
bool has_additional_cmdline_count() const { return _has_field_[5]; }
uint32_t additional_cmdline_count() const { return additional_cmdline_count_; }
void set_additional_cmdline_count(uint32_t value) { additional_cmdline_count_ = value; _has_field_.set(5); }
private:
std::vector<int32_t> target_pid_;
std::vector<std::string> target_cmdline_;
std::vector<int32_t> exclude_pid_;
std::vector<std::string> exclude_cmdline_;
uint32_t additional_cmdline_count_{};
// Allows to preserve unknown protobuf fields for compatibility
// with future versions of .proto files.
std::string unknown_fields_;
std::bitset<6> _has_field_{};
};
} // namespace perfetto
} // namespace protos
} // namespace gen
#endif // PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_PROFILING_PERF_EVENT_CONFIG_PROTO_CPP_H_