diff --git a/agents/grpc/proto/cpu_profile.proto b/agents/grpc/proto/cpu_profile.proto new file mode 100644 index 0000000000..302bcd4155 --- /dev/null +++ b/agents/grpc/proto/cpu_profile.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +// import "common.proto"; + +package grpcagent; + +message CPUProfileArgs { + uint64 thread_id = 1; + uint64 duration = 2; + map metadata = 3; +} \ No newline at end of file diff --git a/agents/grpc/src/proto/cpu_profile.grpc.pb.cc b/agents/grpc/src/proto/cpu_profile.grpc.pb.cc new file mode 100644 index 0000000000..923adddfaa --- /dev/null +++ b/agents/grpc/src/proto/cpu_profile.grpc.pb.cc @@ -0,0 +1,25 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: cpu_profile.proto + +#include "cpu_profile.pb.h" +#include "cpu_profile.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace grpcagent { + +} // namespace grpcagent + diff --git a/agents/grpc/src/proto/cpu_profile.grpc.pb.h b/agents/grpc/src/proto/cpu_profile.grpc.pb.h new file mode 100644 index 0000000000..57f4e6252c --- /dev/null +++ b/agents/grpc/src/proto/cpu_profile.grpc.pb.h @@ -0,0 +1,33 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: cpu_profile.proto +#ifndef GRPC_cpu_5fprofile_2eproto__INCLUDED +#define GRPC_cpu_5fprofile_2eproto__INCLUDED + +#include "cpu_profile.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpcagent { + +} // namespace grpcagent + + +#endif // GRPC_cpu_5fprofile_2eproto__INCLUDED diff --git a/agents/grpc/src/proto/cpu_profile.pb.cc b/agents/grpc/src/proto/cpu_profile.pb.cc new file mode 100644 index 0000000000..b3a9f8092e --- /dev/null +++ b/agents/grpc/src/proto/cpu_profile.pb.cc @@ -0,0 +1,418 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cpu_profile.proto + +#include "cpu_profile.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace grpcagent { +PROTOBUF_CONSTEXPR CPUProfileArgs_MetadataEntry_DoNotUse::CPUProfileArgs_MetadataEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct CPUProfileArgs_MetadataEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR CPUProfileArgs_MetadataEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CPUProfileArgs_MetadataEntry_DoNotUseDefaultTypeInternal() {} + union { + CPUProfileArgs_MetadataEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CPUProfileArgs_MetadataEntry_DoNotUseDefaultTypeInternal _CPUProfileArgs_MetadataEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR CPUProfileArgs::CPUProfileArgs( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.metadata_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.thread_id_)*/uint64_t{0u} + , /*decltype(_impl_.duration_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CPUProfileArgsDefaultTypeInternal { + PROTOBUF_CONSTEXPR CPUProfileArgsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CPUProfileArgsDefaultTypeInternal() {} + union { + CPUProfileArgs _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CPUProfileArgsDefaultTypeInternal _CPUProfileArgs_default_instance_; +} // namespace grpcagent +static ::_pb::Metadata file_level_metadata_cpu_5fprofile_2eproto[2]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_cpu_5fprofile_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_cpu_5fprofile_2eproto = nullptr; + +const uint32_t TableStruct_cpu_5fprofile_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs, _impl_.thread_id_), + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs, _impl_.duration_), + PROTOBUF_FIELD_OFFSET(::grpcagent::CPUProfileArgs, _impl_.metadata_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 8, -1, sizeof(::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse)}, + { 10, -1, -1, sizeof(::grpcagent::CPUProfileArgs)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::grpcagent::_CPUProfileArgs_MetadataEntry_DoNotUse_default_instance_._instance, + &::grpcagent::_CPUProfileArgs_default_instance_._instance, +}; + +const char descriptor_table_protodef_cpu_5fprofile_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\021cpu_profile.proto\022\tgrpcagent\"\241\001\n\016CPUPr" + "ofileArgs\022\021\n\tthread_id\030\001 \001(\004\022\020\n\010duration" + "\030\002 \001(\004\0229\n\010metadata\030\003 \003(\0132\'.grpcagent.CPU" + "ProfileArgs.MetadataEntry\032/\n\rMetadataEnt" + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001b\006prot" + "o3" + ; +static ::_pbi::once_flag descriptor_table_cpu_5fprofile_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_cpu_5fprofile_2eproto = { + false, false, 202, descriptor_table_protodef_cpu_5fprofile_2eproto, + "cpu_profile.proto", + &descriptor_table_cpu_5fprofile_2eproto_once, nullptr, 0, 2, + schemas, file_default_instances, TableStruct_cpu_5fprofile_2eproto::offsets, + file_level_metadata_cpu_5fprofile_2eproto, file_level_enum_descriptors_cpu_5fprofile_2eproto, + file_level_service_descriptors_cpu_5fprofile_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_cpu_5fprofile_2eproto_getter() { + return &descriptor_table_cpu_5fprofile_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_cpu_5fprofile_2eproto(&descriptor_table_cpu_5fprofile_2eproto); +namespace grpcagent { + +// =================================================================== + +CPUProfileArgs_MetadataEntry_DoNotUse::CPUProfileArgs_MetadataEntry_DoNotUse() {} +CPUProfileArgs_MetadataEntry_DoNotUse::CPUProfileArgs_MetadataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void CPUProfileArgs_MetadataEntry_DoNotUse::MergeFrom(const CPUProfileArgs_MetadataEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata CPUProfileArgs_MetadataEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_cpu_5fprofile_2eproto_getter, &descriptor_table_cpu_5fprofile_2eproto_once, + file_level_metadata_cpu_5fprofile_2eproto[0]); +} + +// =================================================================== + +class CPUProfileArgs::_Internal { + public: +}; + +CPUProfileArgs::CPUProfileArgs(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + if (arena != nullptr && !is_message_owned) { + arena->OwnCustomDestructor(this, &CPUProfileArgs::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:grpcagent.CPUProfileArgs) +} +CPUProfileArgs::CPUProfileArgs(const CPUProfileArgs& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CPUProfileArgs* const _this = this; (void)_this; + new (&_impl_) Impl_{ + /*decltype(_impl_.metadata_)*/{} + , decltype(_impl_.thread_id_){} + , decltype(_impl_.duration_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.metadata_.MergeFrom(from._impl_.metadata_); + ::memcpy(&_impl_.thread_id_, &from._impl_.thread_id_, + static_cast(reinterpret_cast(&_impl_.duration_) - + reinterpret_cast(&_impl_.thread_id_)) + sizeof(_impl_.duration_)); + // @@protoc_insertion_point(copy_constructor:grpcagent.CPUProfileArgs) +} + +inline void CPUProfileArgs::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + /*decltype(_impl_.metadata_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.thread_id_){uint64_t{0u}} + , decltype(_impl_.duration_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CPUProfileArgs::~CPUProfileArgs() { + // @@protoc_insertion_point(destructor:grpcagent.CPUProfileArgs) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + ArenaDtor(this); + return; + } + SharedDtor(); +} + +inline void CPUProfileArgs::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.metadata_.Destruct(); + _impl_.metadata_.~MapField(); +} + +void CPUProfileArgs::ArenaDtor(void* object) { + CPUProfileArgs* _this = reinterpret_cast< CPUProfileArgs* >(object); + _this->_impl_.metadata_.Destruct(); +} +void CPUProfileArgs::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CPUProfileArgs::Clear() { +// @@protoc_insertion_point(message_clear_start:grpcagent.CPUProfileArgs) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.metadata_.Clear(); + ::memset(&_impl_.thread_id_, 0, static_cast( + reinterpret_cast(&_impl_.duration_) - + reinterpret_cast(&_impl_.thread_id_)) + sizeof(_impl_.duration_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CPUProfileArgs::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint64 thread_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.thread_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 duration = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.duration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // map metadata = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.metadata_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CPUProfileArgs::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:grpcagent.CPUProfileArgs) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 thread_id = 1; + if (this->_internal_thread_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_thread_id(), target); + } + + // uint64 duration = 2; + if (this->_internal_duration() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_duration(), target); + } + + // map metadata = 3; + if (!this->_internal_metadata().empty()) { + using MapType = ::_pb::Map; + using WireHelper = CPUProfileArgs_MetadataEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_metadata(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "grpcagent.CPUProfileArgs.MetadataEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "grpcagent.CPUProfileArgs.MetadataEntry.value"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:grpcagent.CPUProfileArgs) + return target; +} + +size_t CPUProfileArgs::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:grpcagent.CPUProfileArgs) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map metadata = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_metadata_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_metadata().begin(); + it != this->_internal_metadata().end(); ++it) { + total_size += CPUProfileArgs_MetadataEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // uint64 thread_id = 1; + if (this->_internal_thread_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_thread_id()); + } + + // uint64 duration = 2; + if (this->_internal_duration() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_duration()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CPUProfileArgs::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CPUProfileArgs::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CPUProfileArgs::GetClassData() const { return &_class_data_; } + + +void CPUProfileArgs::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:grpcagent.CPUProfileArgs) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.metadata_.MergeFrom(from._impl_.metadata_); + if (from._internal_thread_id() != 0) { + _this->_internal_set_thread_id(from._internal_thread_id()); + } + if (from._internal_duration() != 0) { + _this->_internal_set_duration(from._internal_duration()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CPUProfileArgs::CopyFrom(const CPUProfileArgs& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpcagent.CPUProfileArgs) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CPUProfileArgs::IsInitialized() const { + return true; +} + +void CPUProfileArgs::InternalSwap(CPUProfileArgs* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.metadata_.InternalSwap(&other->_impl_.metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(CPUProfileArgs, _impl_.duration_) + + sizeof(CPUProfileArgs::_impl_.duration_) + - PROTOBUF_FIELD_OFFSET(CPUProfileArgs, _impl_.thread_id_)>( + reinterpret_cast(&_impl_.thread_id_), + reinterpret_cast(&other->_impl_.thread_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CPUProfileArgs::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_cpu_5fprofile_2eproto_getter, &descriptor_table_cpu_5fprofile_2eproto_once, + file_level_metadata_cpu_5fprofile_2eproto[1]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace grpcagent +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse* +Arena::CreateMaybeMessage< ::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::grpcagent::CPUProfileArgs* +Arena::CreateMaybeMessage< ::grpcagent::CPUProfileArgs >(Arena* arena) { + return Arena::CreateMessageInternal< ::grpcagent::CPUProfileArgs >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/agents/grpc/src/proto/cpu_profile.pb.h b/agents/grpc/src/proto/cpu_profile.pb.h new file mode 100644 index 0000000000..df72d4a952 --- /dev/null +++ b/agents/grpc/src/proto/cpu_profile.pb.h @@ -0,0 +1,372 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cpu_profile.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_cpu_5fprofile_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_cpu_5fprofile_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_cpu_5fprofile_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_cpu_5fprofile_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_cpu_5fprofile_2eproto; +namespace grpcagent { +class CPUProfileArgs; +struct CPUProfileArgsDefaultTypeInternal; +extern CPUProfileArgsDefaultTypeInternal _CPUProfileArgs_default_instance_; +class CPUProfileArgs_MetadataEntry_DoNotUse; +struct CPUProfileArgs_MetadataEntry_DoNotUseDefaultTypeInternal; +extern CPUProfileArgs_MetadataEntry_DoNotUseDefaultTypeInternal _CPUProfileArgs_MetadataEntry_DoNotUse_default_instance_; +} // namespace grpcagent +PROTOBUF_NAMESPACE_OPEN +template<> ::grpcagent::CPUProfileArgs* Arena::CreateMaybeMessage<::grpcagent::CPUProfileArgs>(Arena*); +template<> ::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse* Arena::CreateMaybeMessage<::grpcagent::CPUProfileArgs_MetadataEntry_DoNotUse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace grpcagent { + +// =================================================================== + +class CPUProfileArgs_MetadataEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + CPUProfileArgs_MetadataEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR CPUProfileArgs_MetadataEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit CPUProfileArgs_MetadataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const CPUProfileArgs_MetadataEntry_DoNotUse& other); + static const CPUProfileArgs_MetadataEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_CPUProfileArgs_MetadataEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "grpcagent.CPUProfileArgs.MetadataEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "grpcagent.CPUProfileArgs.MetadataEntry.value"); + } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_cpu_5fprofile_2eproto; +}; + +// ------------------------------------------------------------------- + +class CPUProfileArgs final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:grpcagent.CPUProfileArgs) */ { + public: + inline CPUProfileArgs() : CPUProfileArgs(nullptr) {} + ~CPUProfileArgs() override; + explicit PROTOBUF_CONSTEXPR CPUProfileArgs(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CPUProfileArgs(const CPUProfileArgs& from); + CPUProfileArgs(CPUProfileArgs&& from) noexcept + : CPUProfileArgs() { + *this = ::std::move(from); + } + + inline CPUProfileArgs& operator=(const CPUProfileArgs& from) { + CopyFrom(from); + return *this; + } + inline CPUProfileArgs& operator=(CPUProfileArgs&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CPUProfileArgs& default_instance() { + return *internal_default_instance(); + } + static inline const CPUProfileArgs* internal_default_instance() { + return reinterpret_cast( + &_CPUProfileArgs_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(CPUProfileArgs& a, CPUProfileArgs& b) { + a.Swap(&b); + } + inline void Swap(CPUProfileArgs* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CPUProfileArgs* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CPUProfileArgs* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CPUProfileArgs& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CPUProfileArgs& from) { + CPUProfileArgs::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CPUProfileArgs* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "grpcagent.CPUProfileArgs"; + } + protected: + explicit CPUProfileArgs(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kMetadataFieldNumber = 3, + kThreadIdFieldNumber = 1, + kDurationFieldNumber = 2, + }; + // map metadata = 3; + int metadata_size() const; + private: + int _internal_metadata_size() const; + public: + void clear_metadata(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_metadata() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_metadata(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + metadata() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_metadata(); + + // uint64 thread_id = 1; + void clear_thread_id(); + uint64_t thread_id() const; + void set_thread_id(uint64_t value); + private: + uint64_t _internal_thread_id() const; + void _internal_set_thread_id(uint64_t value); + public: + + // uint64 duration = 2; + void clear_duration(); + uint64_t duration() const; + void set_duration(uint64_t value); + private: + uint64_t _internal_duration() const; + void _internal_set_duration(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:grpcagent.CPUProfileArgs) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + CPUProfileArgs_MetadataEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> metadata_; + uint64_t thread_id_; + uint64_t duration_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_cpu_5fprofile_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// CPUProfileArgs + +// uint64 thread_id = 1; +inline void CPUProfileArgs::clear_thread_id() { + _impl_.thread_id_ = uint64_t{0u}; +} +inline uint64_t CPUProfileArgs::_internal_thread_id() const { + return _impl_.thread_id_; +} +inline uint64_t CPUProfileArgs::thread_id() const { + // @@protoc_insertion_point(field_get:grpcagent.CPUProfileArgs.thread_id) + return _internal_thread_id(); +} +inline void CPUProfileArgs::_internal_set_thread_id(uint64_t value) { + + _impl_.thread_id_ = value; +} +inline void CPUProfileArgs::set_thread_id(uint64_t value) { + _internal_set_thread_id(value); + // @@protoc_insertion_point(field_set:grpcagent.CPUProfileArgs.thread_id) +} + +// uint64 duration = 2; +inline void CPUProfileArgs::clear_duration() { + _impl_.duration_ = uint64_t{0u}; +} +inline uint64_t CPUProfileArgs::_internal_duration() const { + return _impl_.duration_; +} +inline uint64_t CPUProfileArgs::duration() const { + // @@protoc_insertion_point(field_get:grpcagent.CPUProfileArgs.duration) + return _internal_duration(); +} +inline void CPUProfileArgs::_internal_set_duration(uint64_t value) { + + _impl_.duration_ = value; +} +inline void CPUProfileArgs::set_duration(uint64_t value) { + _internal_set_duration(value); + // @@protoc_insertion_point(field_set:grpcagent.CPUProfileArgs.duration) +} + +// map metadata = 3; +inline int CPUProfileArgs::_internal_metadata_size() const { + return _impl_.metadata_.size(); +} +inline int CPUProfileArgs::metadata_size() const { + return _internal_metadata_size(); +} +inline void CPUProfileArgs::clear_metadata() { + _impl_.metadata_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +CPUProfileArgs::_internal_metadata() const { + return _impl_.metadata_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +CPUProfileArgs::metadata() const { + // @@protoc_insertion_point(field_map:grpcagent.CPUProfileArgs.metadata) + return _internal_metadata(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +CPUProfileArgs::_internal_mutable_metadata() { + return _impl_.metadata_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +CPUProfileArgs::mutable_metadata() { + // @@protoc_insertion_point(field_mutable_map:grpcagent.CPUProfileArgs.metadata) + return _internal_mutable_metadata(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace grpcagent + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_cpu_5fprofile_2eproto