//
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/trace/system_info/cpu_info.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/trace/system_info/cpu_info.proto.
 */
export const file_protos_perfetto_trace_system_info_cpu_info: GenFile = /*@__PURE__*/
  fileDesc("CjBwcm90b3MvcGVyZmV0dG8vdHJhY2Uvc3lzdGVtX2luZm8vY3B1X2luZm8ucHJvdG8SD3BlcmZldHRvLnByb3RvcyK6AgoHQ3B1SW5mbxIqCgRjcHVzGAEgAygLMhwucGVyZmV0dG8ucHJvdG9zLkNwdUluZm8uQ3B1Gm4KEEFybUNwdUlkZW50aWZpZXISEwoLaW1wbGVtZW50ZXIYASABKA0SFAoMYXJjaGl0ZWN0dXJlGAIgASgNEg8KB3ZhcmlhbnQYAyABKA0SDAoEcGFydBgEIAEoDRIQCghyZXZpc2lvbhgFIAEoDRqSAQoDQ3B1EhEKCXByb2Nlc3NvchgBIAEoCRITCgtmcmVxdWVuY2llcxgCIAMoDRIQCghjYXBhY2l0eRgDIAEoDRJDCg5hcm1faWRlbnRpZmllchgEIAEoCzIpLnBlcmZldHRvLnByb3Rvcy5DcHVJbmZvLkFybUNwdUlkZW50aWZpZXJIAEIMCgppZGVudGlmaWVy");

/**
 * Information about CPUs from procfs and sysfs.
 *
 * @generated from message perfetto.protos.CpuInfo
 */
export type CpuInfo = Message<"perfetto.protos.CpuInfo"> & {
  /**
   * Describes available CPUs, one entry per CPU.
   *
   * @generated from field: repeated perfetto.protos.CpuInfo.Cpu cpus = 1;
   */
  cpus: CpuInfo_Cpu[];
};

/**
 * Describes the message perfetto.protos.CpuInfo.
 * Use `create(CpuInfoSchema)` to create a new message.
 */
export const CpuInfoSchema: GenMessage<CpuInfo> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_system_info_cpu_info, 0);

/**
 * @generated from message perfetto.protos.CpuInfo.ArmCpuIdentifier
 */
export type CpuInfo_ArmCpuIdentifier = Message<"perfetto.protos.CpuInfo.ArmCpuIdentifier"> & {
  /**
   * Implementer code
   *
   * @generated from field: optional uint32 implementer = 1;
   */
  implementer: number;

  /**
   * Architecture code
   *
   * @generated from field: optional uint32 architecture = 2;
   */
  architecture: number;

  /**
   * CPU variant
   *
   * @generated from field: optional uint32 variant = 3;
   */
  variant: number;

  /**
   * CPU part
   *
   * @generated from field: optional uint32 part = 4;
   */
  part: number;

  /**
   * CPU revision
   *
   * @generated from field: optional uint32 revision = 5;
   */
  revision: number;
};

/**
 * Describes the message perfetto.protos.CpuInfo.ArmCpuIdentifier.
 * Use `create(CpuInfo_ArmCpuIdentifierSchema)` to create a new message.
 */
export const CpuInfo_ArmCpuIdentifierSchema: GenMessage<CpuInfo_ArmCpuIdentifier> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_system_info_cpu_info, 0, 0);

/**
 * Information about a single CPU.
 *
 * @generated from message perfetto.protos.CpuInfo.Cpu
 */
export type CpuInfo_Cpu = Message<"perfetto.protos.CpuInfo.Cpu"> & {
  /**
   * Value of "Processor" field from /proc/cpuinfo for this CPU.
   * Example: "AArch64 Processor rev 12 (aarch64)"
   *
   * @generated from field: optional string processor = 1;
   */
  processor: string;

  /**
   * Frequencies from
   * /sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies
   * where X is the index of this CPU.
   *
   * @generated from field: repeated uint32 frequencies = 2;
   */
  frequencies: number[];

  /**
   * Cpu capacity from /sys/devices/system/cpu/cpuX/cpu_capacity where X is
   * the index of this CPU.
   *
   * @generated from field: optional uint32 capacity = 3;
   */
  capacity: number;

  /**
   * Code to identify the CPU
   *
   * @generated from oneof perfetto.protos.CpuInfo.Cpu.identifier
   */
  identifier: {
    /**
     * @generated from field: perfetto.protos.CpuInfo.ArmCpuIdentifier arm_identifier = 4;
     */
    value: CpuInfo_ArmCpuIdentifier;
    case: "armIdentifier";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message perfetto.protos.CpuInfo.Cpu.
 * Use `create(CpuInfo_CpuSchema)` to create a new message.
 */
export const CpuInfo_CpuSchema: GenMessage<CpuInfo_Cpu> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_system_info_cpu_info, 0, 1);

