// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: third_party/metrics_proto/sampled_profile.proto
// Protobuf C++ Version: 7.35.1

#include "third_party/metrics_proto/sampled_profile.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace metrics {
class SampledProfile::_Internal {
 public:
  using HasBits = decltype(::std::declval<SampledProfile>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_._has_bits_);
};

constexpr SampledProfile::ParseTableT_ SampledProfile::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_._has_bits_),
      0, // no _extensions_
      22, 248,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4290772992,  // skipmap
      offsetof(ParseTableT_, field_entries),
      22,  // num_field_entries
      12,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::metrics::SampledProfile>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // .metrics.SampledProfile.TriggerEvent trigger_event = 1;
      {::_pbi::TcParser::FastEr0S1,
       {8, 8, 8,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.trigger_event_)}},
      // int64 ms_after_boot = 2;
      {::_pbi::TcParser::FastV64S1,
       {16, 6, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_boot_)}},
      // int64 ms_after_login = 3;
      {::_pbi::TcParser::FastV64S1,
       {24, 7, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_login_)}},
      // .metrics.PerfDataProto perf_data = 4;
      {::_pbi::TcParser::FastMtS1,
       {34, 3, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.perf_data_)}},
      // int64 suspend_duration_ms = 5;
      {::_pbi::TcParser::FastV64S1,
       {40, 10, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.suspend_duration_ms_)}},
      // int64 ms_after_resume = 6;
      {::_pbi::TcParser::FastV64S1,
       {48, 11, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_resume_)}},
      // int32 num_tabs_restored = 7;
      {::_pbi::TcParser::FastV32S1,
       {56, 9, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.num_tabs_restored_)}},
      // int64 ms_after_restore = 8;
      {::_pbi::TcParser::FastV64S1,
       {64, 12, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_restore_)}},
      // .metrics.CallStackProfile call_stack_profile = 9;
      {::_pbi::TcParser::FastMtS1,
       {74, 4, 1,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.call_stack_profile_)}},
      // .metrics.PerfStatProto perf_stat = 10;
      {::_pbi::TcParser::FastMtS1,
       {82, 5, 2,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.perf_stat_)}},
      // .metrics.Process process = 11;
      {::_pbi::TcParser::FastEr0S1,
       {88, 13, 10,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.process_)}},
      // .metrics.Thread thread = 12;
      {::_pbi::TcParser::FastEr0S1,
       {96, 14, 31,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.thread_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // repeated uint32 cpu_max_frequency_mhz = 15;
      {::_pbi::TcParser::FastV32P1,
       {122, 0, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.cpu_max_frequency_mhz_)}},
      // float psi_cpu_last_10s_pct = 16;
      {::_pbi::TcParser::FastF32S2,
       {389, 15, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.psi_cpu_last_10s_pct_)}},
      // float psi_cpu_last_60s_pct = 17;
      {::_pbi::TcParser::FastF32S2,
       {397, 16, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.psi_cpu_last_60s_pct_)}},
      // repeated uint32 lacros_pids = 18;
      {::_pbi::TcParser::FastV32P2,
       {402, 1, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.lacros_pids_)}},
      // string lacros_version = 19;
      {::_pbi::TcParser::FastBS2,
       {410, 2, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.lacros_version_)}},
      // .metrics.SystemProfileProto.Channel lacros_channel = 20;
      {::_pbi::TcParser::FastEr0S2,
       {416, 17, 4,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.lacros_channel_)}},
      // .metrics.ThermalState thermal_state = 21;
      {::_pbi::TcParser::FastEr0S2,
       {424, 18, 4,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.thermal_state_)}},
      // int32 cpu_speed_limit_percent = 22;
      {::_pbi::TcParser::FastV32S2,
       {432, 19, 0,
        PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.cpu_speed_limit_percent_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // .metrics.SampledProfile.TriggerEvent trigger_event = 1;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.trigger_event_), _Internal::kHasBitsOffset + 8, 3, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // int64 ms_after_boot = 2;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_boot_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int64 ms_after_login = 3;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_login_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // .metrics.PerfDataProto perf_data = 4;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.perf_data_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // int64 suspend_duration_ms = 5;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.suspend_duration_ms_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int64 ms_after_resume = 6;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_resume_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int32 num_tabs_restored = 7;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.num_tabs_restored_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // int64 ms_after_restore = 8;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.ms_after_restore_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // .metrics.CallStackProfile call_stack_profile = 9;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.call_stack_profile_), _Internal::kHasBitsOffset + 4, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .metrics.PerfStatProto perf_stat = 10;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.perf_stat_), _Internal::kHasBitsOffset + 5, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .metrics.Process process = 11;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.process_), _Internal::kHasBitsOffset + 13, 4, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // .metrics.Thread thread = 12;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.thread_), _Internal::kHasBitsOffset + 14, 5, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // map<uint32, .metrics.Process> process_types = 13;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.process_types_), _Internal::kHasBitsOffset + 20, 6, (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
      // map<uint32, .metrics.Thread> thread_types = 14;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.thread_types_), _Internal::kHasBitsOffset + 21, 8, (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
      // repeated uint32 cpu_max_frequency_mhz = 15;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.cpu_max_frequency_mhz_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)},
      // float psi_cpu_last_10s_pct = 16;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.psi_cpu_last_10s_pct_), _Internal::kHasBitsOffset + 15, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // float psi_cpu_last_60s_pct = 17;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.psi_cpu_last_60s_pct_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // repeated uint32 lacros_pids = 18;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.lacros_pids_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)},
      // string lacros_version = 19;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.lacros_version_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // .metrics.SystemProfileProto.Channel lacros_channel = 20;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.lacros_channel_), _Internal::kHasBitsOffset + 17, 10, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // .metrics.ThermalState thermal_state = 21;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.thermal_state_), _Internal::kHasBitsOffset + 18, 11, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // int32 cpu_speed_limit_percent = 22;
      {PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.cpu_speed_limit_percent_), _Internal::kHasBitsOffset + 19, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::metrics::PerfDataProto>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::metrics::PerfDataProto_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::metrics::CallStackProfile>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::metrics::CallStackProfile_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::metrics::PerfStatProto>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::metrics::PerfStatProto_globals_},
        #endif
        {0, 8},
        {0, 10},
        {0, 31},
        {::_pbi::TcParser::GetMapAuxInfo(
            0, 1, 13, 14, 1)},
        {::_pbi::FieldAuxEnumData{}, ::metrics::Process_internal_data_},
        {::_pbi::TcParser::GetMapAuxInfo(
            0, 1, 13, 14, 1)},
        {::_pbi::FieldAuxEnumData{}, ::metrics::Thread_internal_data_},
        {0, 4},
        {0, 4},
    }},
    {{
    }},
  };
}


inline constexpr SampledProfile::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        cpu_max_frequency_mhz_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.cpu_max_frequency_mhz_)>()
         }
        ,
        _cpu_max_frequency_mhz_cached_byte_size_{0},
        lacros_pids_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.lacros_pids_)>()
         }
        ,
        _lacros_pids_cached_byte_size_{0},
        lacros_version_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        perf_data_{nullptr},
        call_stack_profile_{nullptr},
        perf_stat_{nullptr},
        ms_after_boot_{::int64_t{0}},
        ms_after_login_{::int64_t{0}},
        trigger_event_{static_cast< ::metrics::SampledProfile_TriggerEvent >(0)},
        num_tabs_restored_{0},
        suspend_duration_ms_{::int64_t{0}},
        ms_after_resume_{::int64_t{0}},
        ms_after_restore_{::int64_t{0}},
        process_{static_cast< ::metrics::Process >(0)},
        thread_{static_cast< ::metrics::Thread >(0)},
        psi_cpu_last_10s_pct_{0},
        psi_cpu_last_60s_pct_{0},
        lacros_channel_{static_cast< ::metrics::SystemProfileProto_Channel >(0)},
        thermal_state_{static_cast< ::metrics::ThermalState >(0)},
        cpu_speed_limit_percent_{0},
        process_types_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.process_types_)>()
         }
        ,
        thread_types_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.thread_types_)>()
         }
     {}

template <typename>
constexpr SampledProfile::SampledProfile(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL SampledProfile::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) SampledProfile(arena);
}
constexpr auto SampledProfile::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SampledProfile), alignof(SampledProfile));
}
constexpr auto SampledProfile::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &SampledProfile::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<SampledProfile>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &SampledProfile::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<SampledProfile>(), &SampledProfile::ByteSizeLong,
              &SampledProfile::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_._cached_size_),
          true,
      },
      "metrics.SampledProfile",
  };
}
struct SampledProfileGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr SampledProfileGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 SampledProfile_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(SampledProfile::InternalGenerateClassData_(
            _default, &SampledProfile_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<SampledProfile>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~SampledProfileGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) SampledProfile _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<SampledProfile>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(SampledProfileGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST SampledProfileGlobalsTypeInternal SampledProfile_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* SampledProfile_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return SampledProfile_globals_.GetClassData();
#else
  return SampledProfile_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace metrics
namespace metrics {
PROTOBUF_CONSTINIT const uint32_t SampledProfile_TriggerEvent_internal_data_[] = {
    589824u, 0u, };
static const char SampledProfile_TriggerEvent_names[] = {
    "JANKY_TASK"
    "PERIODIC_COLLECTION"
    "PERIODIC_HEAP_CHURN_COLLECTION"
    "PERIODIC_HEAP_COLLECTION"
    "PROCESS_STARTUP"
    "RESTORE_SESSION"
    "RESUME_FROM_SUSPEND"
    "THREAD_HUNG"
    "UNKNOWN_TRIGGER_EVENT"
};

static const ::google::protobuf::internal::EnumEntry SampledProfile_TriggerEvent_entries[] = {
    {{&SampledProfile_TriggerEvent_names[0], 10}, 5},
    {{&SampledProfile_TriggerEvent_names[10], 19}, 1},
    {{&SampledProfile_TriggerEvent_names[29], 30}, 8},
    {{&SampledProfile_TriggerEvent_names[59], 24}, 7},
    {{&SampledProfile_TriggerEvent_names[83], 15}, 4},
    {{&SampledProfile_TriggerEvent_names[98], 15}, 3},
    {{&SampledProfile_TriggerEvent_names[113], 19}, 2},
    {{&SampledProfile_TriggerEvent_names[132], 11}, 6},
    {{&SampledProfile_TriggerEvent_names[143], 21}, 0},
};

static const int SampledProfile_TriggerEvent_entries_by_number[] = {
    8,  // 0 -> UNKNOWN_TRIGGER_EVENT
    1,  // 1 -> PERIODIC_COLLECTION
    6,  // 2 -> RESUME_FROM_SUSPEND
    5,  // 3 -> RESTORE_SESSION
    4,  // 4 -> PROCESS_STARTUP
    0,  // 5 -> JANKY_TASK
    7,  // 6 -> THREAD_HUNG
    3,  // 7 -> PERIODIC_HEAP_COLLECTION
    2,  // 8 -> PERIODIC_HEAP_CHURN_COLLECTION
};

bool SampledProfile_TriggerEvent_Parse(::absl::string_view name,
                                  SampledProfile_TriggerEvent* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      SampledProfile_TriggerEvent_entries, 9, name, &int_value);
  if (success) {
    *value = static_cast<SampledProfile_TriggerEvent>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    SampledProfile_TriggerEvent_strings[9] = {};

const ::std::string& SampledProfile_TriggerEvent_Name(SampledProfile_TriggerEvent value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      SampledProfile_TriggerEvent_entries, SampledProfile_TriggerEvent_entries_by_number, 9,
      SampledProfile_TriggerEvent_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(SampledProfile_TriggerEvent_entries,
                                  SampledProfile_TriggerEvent_entries_by_number,
                                  9, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : SampledProfile_TriggerEvent_strings[idx].get();
}
// ===================================================================

// ===================================================================

// ===================================================================

void SampledProfile::clear_perf_data() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.perf_data_ != nullptr) _impl_.perf_data_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000008U);
}
void SampledProfile::clear_call_stack_profile() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.call_stack_profile_ != nullptr) _impl_.call_stack_profile_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000010U);
}
void SampledProfile::clear_perf_stat() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.perf_stat_ != nullptr) _impl_.perf_stat_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000020U);
}
SampledProfile::SampledProfile(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SampledProfile_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:metrics.SampledProfile)
}
PROTOBUF_NDEBUG_INLINE SampledProfile::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::metrics::SampledProfile& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        cpu_max_frequency_mhz_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::metrics::SampledProfile,
              PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.cpu_max_frequency_mhz_)>()
          , from.cpu_max_frequency_mhz_
        }
        ,
        _cpu_max_frequency_mhz_cached_byte_size_{0},
        lacros_pids_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::metrics::SampledProfile,
              PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.lacros_pids_)>()
          , from.lacros_pids_
        }
        ,
        _lacros_pids_cached_byte_size_{0},
        lacros_version_(arena, from.lacros_version_),
        process_types_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::metrics::SampledProfile,
              PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.process_types_)>()
          , from.process_types_
        }
        ,
        thread_types_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::metrics::SampledProfile,
              PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.thread_types_)>()
          , from.thread_types_
        }
     {}

SampledProfile::SampledProfile(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const SampledProfile& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SampledProfile_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SampledProfile* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.perf_data_ = (CheckHasBit(cached_has_bits, 0x00000008U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.perf_data_)
                : nullptr;
  _impl_.call_stack_profile_ = (CheckHasBit(cached_has_bits, 0x00000010U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.call_stack_profile_)
                : nullptr;
  _impl_.perf_stat_ = (CheckHasBit(cached_has_bits, 0x00000020U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.perf_stat_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, ms_after_boot_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, ms_after_boot_),
           offsetof(Impl_, cpu_speed_limit_percent_) -
               offsetof(Impl_, ms_after_boot_) +
               sizeof(Impl_::cpu_speed_limit_percent_));

  // @@protoc_insertion_point(copy_constructor:metrics.SampledProfile)
}
PROTOBUF_NDEBUG_INLINE SampledProfile::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        cpu_max_frequency_mhz_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.cpu_max_frequency_mhz_)>()
         }
        ,
        _cpu_max_frequency_mhz_cached_byte_size_{0},
        lacros_pids_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.lacros_pids_)>()
         }
        ,
        _lacros_pids_cached_byte_size_{0},
        lacros_version_(arena),
        process_types_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.process_types_)>()
         }
        ,
        thread_types_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::SampledProfile,
            PROTOBUF_FIELD_OFFSET(::metrics::SampledProfile, _impl_.thread_types_)>()
         }
     {}

inline void SampledProfile::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, perf_data_),
           0,
           offsetof(Impl_, cpu_speed_limit_percent_) -
               offsetof(Impl_, perf_data_) +
               sizeof(Impl_::cpu_speed_limit_percent_));
}
SampledProfile::~SampledProfile() {
  // @@protoc_insertion_point(destructor:metrics.SampledProfile)
  SharedDtor(*this);
}
inline void SampledProfile::SharedDtor(MessageLite& self) {
  SampledProfile& this_ = static_cast<SampledProfile&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.lacros_version_.Destroy();
  delete this_._impl_.perf_data_;
  delete this_._impl_.call_stack_profile_;
  delete this_._impl_.perf_stat_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite SampledProfile_class_data_ =
    SampledProfile::InternalGenerateClassData_(SampledProfile_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SampledProfile::GetClassData() const {
  return SampledProfile_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SampledProfile::GetClassData() const {
  return SampledProfile_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const SampledProfile::ParseTableT_
    SampledProfile::_table_ =
        SampledProfile::InternalGenerateParseTable_(SampledProfile_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void SampledProfile::Clear() {
// @@protoc_insertion_point(message_clear_start:metrics.SampledProfile)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.cpu_max_frequency_mhz_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.lacros_pids_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.lacros_version_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.perf_data_ != nullptr);
      _impl_.perf_data_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(_impl_.call_stack_profile_ != nullptr);
      _impl_.call_stack_profile_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      ABSL_DCHECK(_impl_.perf_stat_ != nullptr);
      _impl_.perf_stat_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000c0U)) {
    ::memset(&_impl_.ms_after_boot_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.ms_after_login_) -
        reinterpret_cast<char*>(&_impl_.ms_after_boot_)) + sizeof(_impl_.ms_after_login_));
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) {
    ::memset(&_impl_.trigger_event_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.psi_cpu_last_10s_pct_) -
        reinterpret_cast<char*>(&_impl_.trigger_event_)) + sizeof(_impl_.psi_cpu_last_10s_pct_));
  }
  if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) {
    ::memset(&_impl_.psi_cpu_last_60s_pct_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.cpu_speed_limit_percent_) -
        reinterpret_cast<char*>(&_impl_.psi_cpu_last_60s_pct_)) + sizeof(_impl_.cpu_speed_limit_percent_));
    if (CheckHasBit(cached_has_bits, 0x00100000U)) {
      _impl_.process_types_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00200000U)) {
      _impl_.thread_types_.Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL SampledProfile::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const SampledProfile& this_ = static_cast<const SampledProfile&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL SampledProfile::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const SampledProfile& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:metrics.SampledProfile)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // .metrics.SampledProfile.TriggerEvent trigger_event = 1;
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this_._internal_trigger_event(), target);
  }

  // int64 ms_after_boot = 2;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
            stream, this_._internal_ms_after_boot(), target);
  }

  // int64 ms_after_login = 3;
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
            stream, this_._internal_ms_after_login(), target);
  }

  // .metrics.PerfDataProto perf_data = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        4, *this_._impl_.perf_data_, this_._impl_.perf_data_->GetCachedSize(), target,
        stream);
  }

  // int64 suspend_duration_ms = 5;
  if (CheckHasBit(cached_has_bits, 0x00000400U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<5>(
            stream, this_._internal_suspend_duration_ms(), target);
  }

  // int64 ms_after_resume = 6;
  if (CheckHasBit(cached_has_bits, 0x00000800U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<6>(
            stream, this_._internal_ms_after_resume(), target);
  }

  // int32 num_tabs_restored = 7;
  if (CheckHasBit(cached_has_bits, 0x00000200U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<7>(
            stream, this_._internal_num_tabs_restored(), target);
  }

  // int64 ms_after_restore = 8;
  if (CheckHasBit(cached_has_bits, 0x00001000U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<8>(
            stream, this_._internal_ms_after_restore(), target);
  }

  // .metrics.CallStackProfile call_stack_profile = 9;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        9, *this_._impl_.call_stack_profile_, this_._impl_.call_stack_profile_->GetCachedSize(), target,
        stream);
  }

  // .metrics.PerfStatProto perf_stat = 10;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        10, *this_._impl_.perf_stat_, this_._impl_.perf_stat_->GetCachedSize(), target,
        stream);
  }

  // .metrics.Process process = 11;
  if (CheckHasBit(cached_has_bits, 0x00002000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        11, this_._internal_process(), target);
  }

  // .metrics.Thread thread = 12;
  if (CheckHasBit(cached_has_bits, 0x00004000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        12, this_._internal_thread(), target);
  }

  // map<uint32, .metrics.Process> process_types = 13;
  if (CheckHasBit(cached_has_bits, 0x00100000U)) {
    if (!this_._internal_process_types().empty()) {
      using MapType = ::google::protobuf::Map<::uint32_t, ::metrics::Process>;
      using WireHelper = _pbi::MapEntryFuncs<::uint32_t, ::metrics::Process,
                                     _pbi::WireFormatLite::TYPE_UINT32,
                                     _pbi::WireFormatLite::TYPE_ENUM>;
      const auto& field = this_._internal_process_types();

      if (stream->IsSerializationDeterministic() && field.size() > 1) {
        for (const auto& entry : ::google::protobuf::internal::MapSorterFlat<MapType>(field)) {
          target = WireHelper::InternalSerialize(
              13, entry.first, entry.second, target, stream);
        }
      } else {
        for (const auto& entry : field) {
          target = WireHelper::InternalSerialize(
              13, entry.first, entry.second, target, stream);
        }
      }
    }
  }

  // map<uint32, .metrics.Thread> thread_types = 14;
  if (CheckHasBit(cached_has_bits, 0x00200000U)) {
    if (!this_._internal_thread_types().empty()) {
      using MapType = ::google::protobuf::Map<::uint32_t, ::metrics::Thread>;
      using WireHelper = _pbi::MapEntryFuncs<::uint32_t, ::metrics::Thread,
                                     _pbi::WireFormatLite::TYPE_UINT32,
                                     _pbi::WireFormatLite::TYPE_ENUM>;
      const auto& field = this_._internal_thread_types();

      if (stream->IsSerializationDeterministic() && field.size() > 1) {
        for (const auto& entry : ::google::protobuf::internal::MapSorterFlat<MapType>(field)) {
          target = WireHelper::InternalSerialize(
              14, entry.first, entry.second, target, stream);
        }
      } else {
        for (const auto& entry : field) {
          target = WireHelper::InternalSerialize(
              14, entry.first, entry.second, target, stream);
        }
      }
    }
  }

  // repeated uint32 cpu_max_frequency_mhz = 15;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    {
      int byte_size = this_._impl_._cpu_max_frequency_mhz_cached_byte_size_.Get();
      if (byte_size > 0) {
        target = stream->WriteUInt32Packed(
            15, this_._internal_cpu_max_frequency_mhz(), byte_size, target);
      }
    }
  }

  // float psi_cpu_last_10s_pct = 16;
  if (CheckHasBit(cached_has_bits, 0x00008000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        16, this_._internal_psi_cpu_last_10s_pct(), target);
  }

  // float psi_cpu_last_60s_pct = 17;
  if (CheckHasBit(cached_has_bits, 0x00010000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        17, this_._internal_psi_cpu_last_60s_pct(), target);
  }

  // repeated uint32 lacros_pids = 18;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    {
      int byte_size = this_._impl_._lacros_pids_cached_byte_size_.Get();
      if (byte_size > 0) {
        target = stream->WriteUInt32Packed(
            18, this_._internal_lacros_pids(), byte_size, target);
      }
    }
  }

  // string lacros_version = 19;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::std::string& _s = this_._internal_lacros_version();
    target = stream->WriteStringMaybeAliased(19, _s, target);
  }

  // .metrics.SystemProfileProto.Channel lacros_channel = 20;
  if (CheckHasBit(cached_has_bits, 0x00020000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        20, this_._internal_lacros_channel(), target);
  }

  // .metrics.ThermalState thermal_state = 21;
  if (CheckHasBit(cached_has_bits, 0x00040000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        21, this_._internal_thermal_state(), target);
  }

  // int32 cpu_speed_limit_percent = 22;
  if (CheckHasBit(cached_has_bits, 0x00080000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        22, this_._internal_cpu_speed_limit_percent(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:metrics.SampledProfile)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SampledProfile::ByteSizeLong(const MessageLite& base) {
  const SampledProfile& this_ = static_cast<const SampledProfile&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t SampledProfile::ByteSizeLong() const {
  const SampledProfile& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:metrics.SampledProfile)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += ::absl::popcount(0x00018000U & cached_has_bits) * 6;
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    // repeated uint32 cpu_max_frequency_mhz = 15;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size +=
          ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize(
              this_._internal_cpu_max_frequency_mhz(), 1,
              this_._impl_._cpu_max_frequency_mhz_cached_byte_size_);
    }
    // repeated uint32 lacros_pids = 18;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size +=
          ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize(
              this_._internal_lacros_pids(), 2,
              this_._impl_._lacros_pids_cached_byte_size_);
    }
    // string lacros_version = 19;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_lacros_version());
    }
    // .metrics.PerfDataProto perf_data = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.perf_data_);
    }
    // .metrics.CallStackProfile call_stack_profile = 9;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.call_stack_profile_);
    }
    // .metrics.PerfStatProto perf_stat = 10;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.perf_stat_);
    }
    // int64 ms_after_boot = 2;
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_ms_after_boot());
    }
    // int64 ms_after_login = 3;
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_ms_after_login());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00007f00U)) {
    // .metrics.SampledProfile.TriggerEvent trigger_event = 1;
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_trigger_event());
    }
    // int32 num_tabs_restored = 7;
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_num_tabs_restored());
    }
    // int64 suspend_duration_ms = 5;
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_suspend_duration_ms());
    }
    // int64 ms_after_resume = 6;
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_ms_after_resume());
    }
    // int64 ms_after_restore = 8;
    if (CheckHasBit(cached_has_bits, 0x00001000U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_ms_after_restore());
    }
    // .metrics.Process process = 11;
    if (CheckHasBit(cached_has_bits, 0x00002000U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_process());
    }
    // .metrics.Thread thread = 12;
    if (CheckHasBit(cached_has_bits, 0x00004000U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_thread());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x003e0000U)) {
    // .metrics.SystemProfileProto.Channel lacros_channel = 20;
    if (CheckHasBit(cached_has_bits, 0x00020000U)) {
      total_size += 2 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_lacros_channel());
    }
    // .metrics.ThermalState thermal_state = 21;
    if (CheckHasBit(cached_has_bits, 0x00040000U)) {
      total_size += 2 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_thermal_state());
    }
    // int32 cpu_speed_limit_percent = 22;
    if (CheckHasBit(cached_has_bits, 0x00080000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_cpu_speed_limit_percent());
    }
    // map<uint32, .metrics.Process> process_types = 13;
    if (CheckHasBit(cached_has_bits, 0x00100000U)) {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_process_types_size());
      for (const auto& entry : this_._internal_process_types()) {
        total_size += _pbi::MapEntryFuncs<::uint32_t, ::metrics::Process,
                                       _pbi::WireFormatLite::TYPE_UINT32,
                                       _pbi::WireFormatLite::TYPE_ENUM>::ByteSizeLong(entry.first, entry.second);
      }
    }
    // map<uint32, .metrics.Thread> thread_types = 14;
    if (CheckHasBit(cached_has_bits, 0x00200000U)) {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_thread_types_size());
      for (const auto& entry : this_._internal_thread_types()) {
        total_size += _pbi::MapEntryFuncs<::uint32_t, ::metrics::Thread,
                                       _pbi::WireFormatLite::TYPE_UINT32,
                                       _pbi::WireFormatLite::TYPE_ENUM>::ByteSizeLong(entry.first, entry.second);
      }
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void SampledProfile::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<SampledProfile*>(&to_msg);
  auto& from = static_cast<const SampledProfile&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:metrics.SampledProfile)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_cpu_max_frequency_mhz()->MergeFrom(from._internal_cpu_max_frequency_mhz());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_lacros_pids()->MergeFrom(from._internal_lacros_pids());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_lacros_version(from._internal_lacros_version());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.perf_data_ != nullptr);
      if (_this->_impl_.perf_data_ == nullptr) {
        _this->_impl_.perf_data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.perf_data_);
      } else {
        _this->_impl_.perf_data_->MergeFrom(*from._impl_.perf_data_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(from._impl_.call_stack_profile_ != nullptr);
      if (_this->_impl_.call_stack_profile_ == nullptr) {
        _this->_impl_.call_stack_profile_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.call_stack_profile_);
      } else {
        _this->_impl_.call_stack_profile_->MergeFrom(*from._impl_.call_stack_profile_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      ABSL_DCHECK(from._impl_.perf_stat_ != nullptr);
      if (_this->_impl_.perf_stat_ == nullptr) {
        _this->_impl_.perf_stat_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.perf_stat_);
      } else {
        _this->_impl_.perf_stat_->MergeFrom(*from._impl_.perf_stat_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.ms_after_boot_ = from._impl_.ms_after_boot_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.ms_after_login_ = from._impl_.ms_after_login_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) {
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      _this->_impl_.trigger_event_ = from._impl_.trigger_event_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      _this->_impl_.num_tabs_restored_ = from._impl_.num_tabs_restored_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      _this->_impl_.suspend_duration_ms_ = from._impl_.suspend_duration_ms_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      _this->_impl_.ms_after_resume_ = from._impl_.ms_after_resume_;
    }
    if (CheckHasBit(cached_has_bits, 0x00001000U)) {
      _this->_impl_.ms_after_restore_ = from._impl_.ms_after_restore_;
    }
    if (CheckHasBit(cached_has_bits, 0x00002000U)) {
      _this->_impl_.process_ = from._impl_.process_;
    }
    if (CheckHasBit(cached_has_bits, 0x00004000U)) {
      _this->_impl_.thread_ = from._impl_.thread_;
    }
    if (CheckHasBit(cached_has_bits, 0x00008000U)) {
      _this->_impl_.psi_cpu_last_10s_pct_ = from._impl_.psi_cpu_last_10s_pct_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) {
    if (CheckHasBit(cached_has_bits, 0x00010000U)) {
      _this->_impl_.psi_cpu_last_60s_pct_ = from._impl_.psi_cpu_last_60s_pct_;
    }
    if (CheckHasBit(cached_has_bits, 0x00020000U)) {
      _this->_impl_.lacros_channel_ = from._impl_.lacros_channel_;
    }
    if (CheckHasBit(cached_has_bits, 0x00040000U)) {
      _this->_impl_.thermal_state_ = from._impl_.thermal_state_;
    }
    if (CheckHasBit(cached_has_bits, 0x00080000U)) {
      _this->_impl_.cpu_speed_limit_percent_ = from._impl_.cpu_speed_limit_percent_;
    }
    if (CheckHasBit(cached_has_bits, 0x00100000U)) {
      _this->_impl_.process_types_.MergeFrom(from._impl_.process_types_);
    }
    if (CheckHasBit(cached_has_bits, 0x00200000U)) {
      _this->_impl_.thread_types_.MergeFrom(from._impl_.thread_types_);
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void SampledProfile::CopyFrom(const SampledProfile& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:metrics.SampledProfile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void SampledProfile::InternalSwap(SampledProfile* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.cpu_max_frequency_mhz_.InternalSwap(&other->_impl_.cpu_max_frequency_mhz_);
  _impl_.lacros_pids_.InternalSwap(&other->_impl_.lacros_pids_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.lacros_version_, &other->_impl_.lacros_version_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.cpu_speed_limit_percent_)
      + sizeof(SampledProfile::_impl_.cpu_speed_limit_percent_)
      - PROTOBUF_FIELD_OFFSET(SampledProfile, _impl_.perf_data_)>(
          reinterpret_cast<char*>(&_impl_.perf_data_),
          reinterpret_cast<char*>(&other->_impl_.perf_data_));
  _impl_.process_types_.InternalSwap(&other->_impl_.process_types_);
  _impl_.thread_types_.InternalSwap(&other->_impl_.thread_types_);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace metrics
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
