//
// Copyright (C) 2024 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/chrome/v8.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

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

/**
 * Describes the file protos/perfetto/trace/chrome/v8.proto.
 */
export const file_protos_perfetto_trace_chrome_v8: GenFile = /*@__PURE__*/
  fileDesc("CiVwcm90b3MvcGVyZmV0dG8vdHJhY2UvY2hyb21lL3Y4LnByb3RvEg9wZXJmZXR0by5wcm90b3MiVgoIVjhTdHJpbmcSEAoGbGF0aW4xGAEgASgMSAASEgoIdXRmMTZfbGUYAiABKAxIABISCgh1dGYxNl9iZRgDIAEoDEgAQhAKDmVuY29kZWRfc3RyaW5nImsKEEludGVybmVkVjhTdHJpbmcSCwoDaWlkGAEgASgEEhAKBmxhdGluMRgCIAEoDEgAEhIKCHV0ZjE2X2xlGAMgASgMSAASEgoIdXRmMTZfYmUYBCABKAxIAEIQCg5lbmNvZGVkX3N0cmluZyLFAgoSSW50ZXJuZWRWOEpzU2NyaXB0EgsKA2lpZBgBIAEoBBIRCglzY3JpcHRfaWQYAiABKAUSNgoEdHlwZRgDIAEoDjIoLnBlcmZldHRvLnByb3Rvcy5JbnRlcm5lZFY4SnNTY3JpcHQuVHlwZRInCgRuYW1lGAQgASgLMhkucGVyZmV0dG8ucHJvdG9zLlY4U3RyaW5nEikKBnNvdXJjZRgFIAEoC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nMiHQoOVjhDb2RlRGVmYXVsdHMSCwoDdGlkGAEgASgN");

/**
 * Strings used by V8 can have different encodings, instead of coverting to a
 * common encoding (e.g. UTF-8) on device is expensive. Instead we send the
 * "raw" string and do the convestion at trace ingestion time.
 *
 * ATTENTION: There is some overhead in using a message (as opossed to having
 * the `oneof encoded_string`` direcly embedded in the message), so use this
 * message in places were these extra bytes don't matter that much.
 * Next id: 5
 *
 * @generated from message perfetto.protos.V8String
 */
export type V8String = Message<"perfetto.protos.V8String"> & {
  /**
   * @generated from oneof perfetto.protos.V8String.encoded_string
   */
  encodedString: {
    /**
     * ISO/IEC 8859-1:1998 encoding aka latin1
     * https://en.wikipedia.org/wiki/ISO/IEC_8859-1
     *
     * @generated from field: bytes latin1 = 1;
     */
    value: Uint8Array;
    case: "latin1";
  } | {
    /**
     * UTF-16 Little Endian Encoding
     *
     * @generated from field: bytes utf16_le = 2;
     */
    value: Uint8Array;
    case: "utf16Le";
  } | {
    /**
     * UTF-16 Big Endian Encoding
     *
     * @generated from field: bytes utf16_be = 3;
     */
    value: Uint8Array;
    case: "utf16Be";
  } | { case: undefined; value?: undefined };
};

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

/**
 * Interned version of V8String
 *
 * @generated from message perfetto.protos.InternedV8String
 */
export type InternedV8String = Message<"perfetto.protos.InternedV8String"> & {
  /**
   * @generated from field: optional uint64 iid = 1;
   */
  iid: bigint;

  /**
   * We inline the fields in V8String here to save some bytes in the serialized
   * proto format. Interning is about saving bytes so this makes sense here.
   *
   * @generated from oneof perfetto.protos.InternedV8String.encoded_string
   */
  encodedString: {
    /**
     * ISO/IEC 8859-1:1998 encoding aka latin1
     * https://en.wikipedia.org/wiki/ISO/IEC_8859-1
     *
     * @generated from field: bytes latin1 = 2;
     */
    value: Uint8Array;
    case: "latin1";
  } | {
    /**
     * UTF-16 Little Endian Encoding
     *
     * @generated from field: bytes utf16_le = 3;
     */
    value: Uint8Array;
    case: "utf16Le";
  } | {
    /**
     * UTF-16 Big Endian Encoding
     *
     * @generated from field: bytes utf16_be = 4;
     */
    value: Uint8Array;
    case: "utf16Be";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message perfetto.protos.InternedV8String.
 * Use `create(InternedV8StringSchema)` to create a new message.
 */
export const InternedV8StringSchema: GenMessage<InternedV8String> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 1);

/**
 * Represents a script that was compiled to generate code. Some V8 code is
 * generated out of scripts and will reference a V8Script other types of code
 * will not (e.g. builtins).
 *
 * @generated from message perfetto.protos.InternedV8JsScript
 */
export type InternedV8JsScript = Message<"perfetto.protos.InternedV8JsScript"> & {
  /**
   * @generated from field: optional uint64 iid = 1;
   */
  iid: bigint;

  /**
   * Unique in a given isolate
   *
   * @generated from field: optional int32 script_id = 2;
   */
  scriptId: number;

  /**
   * @generated from field: optional perfetto.protos.InternedV8JsScript.Type type = 3;
   */
  type: InternedV8JsScript_Type;

  /**
   * @generated from field: optional perfetto.protos.V8String name = 4;
   */
  name?: V8String;

  /**
   * Actual source of the script
   *
   * @generated from field: optional perfetto.protos.V8String source = 5;
   */
  source?: V8String;
};

/**
 * Describes the message perfetto.protos.InternedV8JsScript.
 * Use `create(InternedV8JsScriptSchema)` to create a new message.
 */
export const InternedV8JsScriptSchema: GenMessage<InternedV8JsScript> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 2);

/**
 * @generated from enum perfetto.protos.InternedV8JsScript.Type
 */
export enum InternedV8JsScript_Type {
  /**
   * @generated from enum value: TYPE_UNKNOWN = 0;
   */
  UNKNOWN = 0,

  /**
   * @generated from enum value: TYPE_NORMAL = 1;
   */
  NORMAL = 1,

  /**
   * @generated from enum value: TYPE_EVAL = 2;
   */
  EVAL = 2,

  /**
   * @generated from enum value: TYPE_MODULE = 3;
   */
  MODULE = 3,

  /**
   * @generated from enum value: TYPE_NATIVE = 4;
   */
  NATIVE = 4,

  /**
   * @generated from enum value: TYPE_EXTENSION = 5;
   */
  EXTENSION = 5,

  /**
   * @generated from enum value: TYPE_INSPECTOR = 6;
   */
  INSPECTOR = 6,
}

/**
 * Describes the enum perfetto.protos.InternedV8JsScript.Type.
 */
export const InternedV8JsScript_TypeSchema: GenEnum<InternedV8JsScript_Type> = /*@__PURE__*/
  enumDesc(file_protos_perfetto_trace_chrome_v8, 2, 0);

/**
 * @generated from message perfetto.protos.InternedV8WasmScript
 */
export type InternedV8WasmScript = Message<"perfetto.protos.InternedV8WasmScript"> & {
  /**
   * @generated from field: optional uint64 iid = 1;
   */
  iid: bigint;

  /**
   * Unique in a given isolate
   *
   * @generated from field: optional int32 script_id = 2;
   */
  scriptId: number;

  /**
   * @generated from field: optional string url = 3;
   */
  url: string;
};

/**
 * Describes the message perfetto.protos.InternedV8WasmScript.
 * Use `create(InternedV8WasmScriptSchema)` to create a new message.
 */
export const InternedV8WasmScriptSchema: GenMessage<InternedV8WasmScript> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 3);

/**
 * @generated from message perfetto.protos.InternedV8JsFunction
 */
export type InternedV8JsFunction = Message<"perfetto.protos.InternedV8JsFunction"> & {
  /**
   * @generated from field: optional uint64 iid = 1;
   */
  iid: bigint;

  /**
   * @generated from field: optional uint64 v8_js_function_name_iid = 2;
   */
  v8JsFunctionNameIid: bigint;

  /**
   * @generated from field: optional uint64 v8_js_script_iid = 3;
   */
  v8JsScriptIid: bigint;

  /**
   * @generated from field: optional bool is_toplevel = 4;
   */
  isToplevel: boolean;

  /**
   * @generated from field: optional perfetto.protos.InternedV8JsFunction.Kind kind = 5;
   */
  kind: InternedV8JsFunction_Kind;

  /**
   * Where in the script source this function is defined. This is counted in
   * bytes not characters.
   *
   * @generated from field: optional uint32 byte_offset = 6;
   */
  byteOffset: number;
};

/**
 * Describes the message perfetto.protos.InternedV8JsFunction.
 * Use `create(InternedV8JsFunctionSchema)` to create a new message.
 */
export const InternedV8JsFunctionSchema: GenMessage<InternedV8JsFunction> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 4);

/**
 * @generated from enum perfetto.protos.InternedV8JsFunction.Kind
 */
export enum InternedV8JsFunction_Kind {
  /**
   * @generated from enum value: KIND_UNKNOWN = 0;
   */
  UNKNOWN = 0,

  /**
   * @generated from enum value: KIND_NORMAL_FUNCTION = 1;
   */
  NORMAL_FUNCTION = 1,

  /**
   * @generated from enum value: KIND_MODULE = 2;
   */
  MODULE = 2,

  /**
   * @generated from enum value: KIND_ASYNC_MODULE = 3;
   */
  ASYNC_MODULE = 3,

  /**
   * @generated from enum value: KIND_BASE_CONSTRUCTOR = 4;
   */
  BASE_CONSTRUCTOR = 4,

  /**
   * @generated from enum value: KIND_DEFAULT_BASE_CONSTRUCTOR = 5;
   */
  DEFAULT_BASE_CONSTRUCTOR = 5,

  /**
   * @generated from enum value: KIND_DEFAULT_DERIVED_CONSTRUCTOR = 6;
   */
  DEFAULT_DERIVED_CONSTRUCTOR = 6,

  /**
   * @generated from enum value: KIND_DERIVED_CONSTRUCTOR = 7;
   */
  DERIVED_CONSTRUCTOR = 7,

  /**
   * @generated from enum value: KIND_GETTER_FUNCTION = 8;
   */
  GETTER_FUNCTION = 8,

  /**
   * @generated from enum value: KIND_STATIC_GETTER_FUNCTION = 9;
   */
  STATIC_GETTER_FUNCTION = 9,

  /**
   * @generated from enum value: KIND_SETTER_FUNCTION = 10;
   */
  SETTER_FUNCTION = 10,

  /**
   * @generated from enum value: KIND_STATIC_SETTER_FUNCTION = 11;
   */
  STATIC_SETTER_FUNCTION = 11,

  /**
   * @generated from enum value: KIND_ARROW_FUNCTION = 12;
   */
  ARROW_FUNCTION = 12,

  /**
   * @generated from enum value: KIND_ASYNC_ARROW_FUNCTION = 13;
   */
  ASYNC_ARROW_FUNCTION = 13,

  /**
   * @generated from enum value: KIND_ASYNC_FUNCTION = 14;
   */
  ASYNC_FUNCTION = 14,

  /**
   * @generated from enum value: KIND_ASYNC_CONCISE_METHOD = 15;
   */
  ASYNC_CONCISE_METHOD = 15,

  /**
   * @generated from enum value: KIND_STATIC_ASYNC_CONCISE_METHOD = 16;
   */
  STATIC_ASYNC_CONCISE_METHOD = 16,

  /**
   * @generated from enum value: KIND_ASYNC_CONCISE_GENERATOR_METHOD = 17;
   */
  ASYNC_CONCISE_GENERATOR_METHOD = 17,

  /**
   * @generated from enum value: KIND_STATIC_ASYNC_CONCISE_GENERATOR_METHOD = 18;
   */
  STATIC_ASYNC_CONCISE_GENERATOR_METHOD = 18,

  /**
   * @generated from enum value: KIND_ASYNC_GENERATOR_FUNCTION = 19;
   */
  ASYNC_GENERATOR_FUNCTION = 19,

  /**
   * @generated from enum value: KIND_GENERATOR_FUNCTION = 20;
   */
  GENERATOR_FUNCTION = 20,

  /**
   * @generated from enum value: KIND_CONCISE_GENERATOR_METHOD = 21;
   */
  CONCISE_GENERATOR_METHOD = 21,

  /**
   * @generated from enum value: KIND_STATIC_CONCISE_GENERATOR_METHOD = 22;
   */
  STATIC_CONCISE_GENERATOR_METHOD = 22,

  /**
   * @generated from enum value: KIND_CONCISE_METHOD = 23;
   */
  CONCISE_METHOD = 23,

  /**
   * @generated from enum value: KIND_STATIC_CONCISE_METHOD = 24;
   */
  STATIC_CONCISE_METHOD = 24,

  /**
   * @generated from enum value: KIND_CLASS_MEMBERS_INITIALIZER_FUNCTION = 25;
   */
  CLASS_MEMBERS_INITIALIZER_FUNCTION = 25,

  /**
   * @generated from enum value: KIND_CLASS_STATIC_INITIALIZER_FUNCTION = 26;
   */
  CLASS_STATIC_INITIALIZER_FUNCTION = 26,

  /**
   * @generated from enum value: KIND_INVALID = 27;
   */
  INVALID = 27,
}

/**
 * Describes the enum perfetto.protos.InternedV8JsFunction.Kind.
 */
export const InternedV8JsFunction_KindSchema: GenEnum<InternedV8JsFunction_Kind> = /*@__PURE__*/
  enumDesc(file_protos_perfetto_trace_chrome_v8, 4, 0);

/**
 * A V8 Isolate instance. A V8 Isolate represents an isolated instance of the V8
 * engine.
 *
 * @generated from message perfetto.protos.InternedV8Isolate
 */
export type InternedV8Isolate = Message<"perfetto.protos.InternedV8Isolate"> & {
  /**
   * @generated from field: optional uint64 iid = 1;
   */
  iid: bigint;

  /**
   * @generated from field: optional uint32 pid = 2;
   */
  pid: number;

  /**
   * Process unique isolate id.
   *
   * @generated from field: optional int32 isolate_id = 3;
   */
  isolateId: number;

  /**
   * @generated from field: optional perfetto.protos.InternedV8Isolate.CodeRange code_range = 4;
   */
  codeRange?: InternedV8Isolate_CodeRange;

  /**
   * The embedded blob holds code for built in functions that are precompiled in
   * the V8 library.
   *
   * @generated from field: optional uint64 embedded_blob_code_start_address = 5;
   */
  embeddedBlobCodeStartAddress: bigint;

  /**
   * @generated from field: optional uint64 embedded_blob_code_size = 6;
   */
  embeddedBlobCodeSize: bigint;
};

/**
 * Describes the message perfetto.protos.InternedV8Isolate.
 * Use `create(InternedV8IsolateSchema)` to create a new message.
 */
export const InternedV8IsolateSchema: GenMessage<InternedV8Isolate> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 5);

/**
 * A code range is a virtual memory cage that may contain executable code.
 * Depending on the Isolate settings the Isolate might have one or not.
 * See:
 * https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/code-range.h
 * If the isolate defines code range this will be tracked here.
 *
 * @generated from message perfetto.protos.InternedV8Isolate.CodeRange
 */
export type InternedV8Isolate_CodeRange = Message<"perfetto.protos.InternedV8Isolate.CodeRange"> & {
  /**
   * @generated from field: optional uint64 base_address = 1;
   */
  baseAddress: bigint;

  /**
   * @generated from field: optional uint64 size = 2;
   */
  size: bigint;

  /**
   * Used when short builtin calls are enabled, where embedded builtins are
   * copied into the CodeRange so calls can be nearer.
   *
   * @generated from field: optional uint64 embedded_blob_code_copy_start_address = 3;
   */
  embeddedBlobCodeCopyStartAddress: bigint;

  /**
   * Whether this code range is shared with other Isolates in the same process
   *
   * @generated from field: optional bool is_process_wide = 4;
   */
  isProcessWide: boolean;
};

/**
 * Describes the message perfetto.protos.InternedV8Isolate.CodeRange.
 * Use `create(InternedV8Isolate_CodeRangeSchema)` to create a new message.
 */
export const InternedV8Isolate_CodeRangeSchema: GenMessage<InternedV8Isolate_CodeRange> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 5, 0);

/**
 * @generated from message perfetto.protos.V8JsCode
 */
export type V8JsCode = Message<"perfetto.protos.V8JsCode"> & {
  /**
   * @generated from field: optional uint64 v8_isolate_iid = 1;
   */
  v8IsolateIid: bigint;

  /**
   * @generated from field: optional uint32 tid = 2;
   */
  tid: number;

  /**
   * @generated from field: optional uint64 v8_js_function_iid = 3;
   */
  v8JsFunctionIid: bigint;

  /**
   * @generated from field: optional perfetto.protos.V8JsCode.Tier tier = 4;
   */
  tier: V8JsCode_Tier;

  /**
   * @generated from field: optional uint64 instruction_start = 5;
   */
  instructionStart: bigint;

  /**
   * @generated from field: optional uint64 instruction_size_bytes = 6;
   */
  instructionSizeBytes: bigint;

  /**
   * @generated from oneof perfetto.protos.V8JsCode.instructions
   */
  instructions: {
    /**
     * @generated from field: bytes machine_code = 7;
     */
    value: Uint8Array;
    case: "machineCode";
  } | {
    /**
     * @generated from field: bytes bytecode = 8;
     */
    value: Uint8Array;
    case: "bytecode";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message perfetto.protos.V8JsCode.
 * Use `create(V8JsCodeSchema)` to create a new message.
 */
export const V8JsCodeSchema: GenMessage<V8JsCode> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 6);

/**
 * @generated from enum perfetto.protos.V8JsCode.Tier
 */
export enum V8JsCode_Tier {
  /**
   * @generated from enum value: TIER_UNKNOWN = 0;
   */
  UNKNOWN = 0,

  /**
   * @generated from enum value: TIER_IGNITION = 1;
   */
  IGNITION = 1,

  /**
   * @generated from enum value: TIER_SPARKPLUG = 2;
   */
  SPARKPLUG = 2,

  /**
   * @generated from enum value: TIER_MAGLEV = 3;
   */
  MAGLEV = 3,

  /**
   * @generated from enum value: TIER_TURBOSHAFT = 4;
   */
  TURBOSHAFT = 4,

  /**
   * @generated from enum value: TIER_TURBOFAN = 5;
   */
  TURBOFAN = 5,
}

/**
 * Describes the enum perfetto.protos.V8JsCode.Tier.
 */
export const V8JsCode_TierSchema: GenEnum<V8JsCode_Tier> = /*@__PURE__*/
  enumDesc(file_protos_perfetto_trace_chrome_v8, 6, 0);

/**
 * @generated from message perfetto.protos.V8InternalCode
 */
export type V8InternalCode = Message<"perfetto.protos.V8InternalCode"> & {
  /**
   * @generated from field: optional uint64 v8_isolate_iid = 1;
   */
  v8IsolateIid: bigint;

  /**
   * @generated from field: optional uint32 tid = 2;
   */
  tid: number;

  /**
   * @generated from field: optional string name = 3;
   */
  name: string;

  /**
   * @generated from field: optional perfetto.protos.V8InternalCode.Type type = 4;
   */
  type: V8InternalCode_Type;

  /**
   * @generated from field: optional int32 builtin_id = 5;
   */
  builtinId: number;

  /**
   * @generated from field: optional uint64 instruction_start = 6;
   */
  instructionStart: bigint;

  /**
   * @generated from field: optional uint64 instruction_size_bytes = 7;
   */
  instructionSizeBytes: bigint;

  /**
   * @generated from field: optional bytes machine_code = 8;
   */
  machineCode: Uint8Array;
};

/**
 * Describes the message perfetto.protos.V8InternalCode.
 * Use `create(V8InternalCodeSchema)` to create a new message.
 */
export const V8InternalCodeSchema: GenMessage<V8InternalCode> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 7);

/**
 * @generated from enum perfetto.protos.V8InternalCode.Type
 */
export enum V8InternalCode_Type {
  /**
   * @generated from enum value: TYPE_UNKNOWN = 0;
   */
  UNKNOWN = 0,

  /**
   * @generated from enum value: TYPE_BYTECODE_HANDLER = 1;
   */
  BYTECODE_HANDLER = 1,

  /**
   * @generated from enum value: TYPE_FOR_TESTING = 2;
   */
  FOR_TESTING = 2,

  /**
   * @generated from enum value: TYPE_BUILTIN = 3;
   */
  BUILTIN = 3,

  /**
   * @generated from enum value: TYPE_WASM_FUNCTION = 4;
   */
  WASM_FUNCTION = 4,

  /**
   * @generated from enum value: TYPE_WASM_TO_CAPI_FUNCTION = 5;
   */
  WASM_TO_CAPI_FUNCTION = 5,

  /**
   * @generated from enum value: TYPE_WASM_TO_JS_FUNCTION = 6;
   */
  WASM_TO_JS_FUNCTION = 6,

  /**
   * @generated from enum value: TYPE_JS_TO_WASM_FUNCTION = 7;
   */
  JS_TO_WASM_FUNCTION = 7,

  /**
   * @generated from enum value: TYPE_JS_TO_JS_FUNCTION = 8;
   */
  JS_TO_JS_FUNCTION = 8,

  /**
   * @generated from enum value: TYPE_C_WASM_ENTRY = 9;
   */
  C_WASM_ENTRY = 9,
}

/**
 * Describes the enum perfetto.protos.V8InternalCode.Type.
 */
export const V8InternalCode_TypeSchema: GenEnum<V8InternalCode_Type> = /*@__PURE__*/
  enumDesc(file_protos_perfetto_trace_chrome_v8, 7, 0);

/**
 * @generated from message perfetto.protos.V8WasmCode
 */
export type V8WasmCode = Message<"perfetto.protos.V8WasmCode"> & {
  /**
   * @generated from field: optional uint64 v8_isolate_iid = 1;
   */
  v8IsolateIid: bigint;

  /**
   * @generated from field: optional uint32 tid = 2;
   */
  tid: number;

  /**
   * @generated from field: optional uint64 v8_wasm_script_iid = 3;
   */
  v8WasmScriptIid: bigint;

  /**
   * @generated from field: optional string function_name = 4;
   */
  functionName: string;

  /**
   * @generated from field: optional perfetto.protos.V8WasmCode.Tier tier = 5;
   */
  tier: V8WasmCode_Tier;

  /**
   * @generated from field: optional int32 code_offset_in_module = 6;
   */
  codeOffsetInModule: number;

  /**
   * @generated from field: optional uint64 instruction_start = 7;
   */
  instructionStart: bigint;

  /**
   * @generated from field: optional uint64 instruction_size_bytes = 8;
   */
  instructionSizeBytes: bigint;

  /**
   * @generated from field: optional bytes machine_code = 9;
   */
  machineCode: Uint8Array;
};

/**
 * Describes the message perfetto.protos.V8WasmCode.
 * Use `create(V8WasmCodeSchema)` to create a new message.
 */
export const V8WasmCodeSchema: GenMessage<V8WasmCode> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 8);

/**
 * @generated from enum perfetto.protos.V8WasmCode.Tier
 */
export enum V8WasmCode_Tier {
  /**
   * @generated from enum value: TIER_UNKNOWN = 0;
   */
  UNKNOWN = 0,

  /**
   * @generated from enum value: TIER_LIFTOFF = 1;
   */
  LIFTOFF = 1,

  /**
   * @generated from enum value: TIER_TURBOFAN = 2;
   */
  TURBOFAN = 2,
}

/**
 * Describes the enum perfetto.protos.V8WasmCode.Tier.
 */
export const V8WasmCode_TierSchema: GenEnum<V8WasmCode_Tier> = /*@__PURE__*/
  enumDesc(file_protos_perfetto_trace_chrome_v8, 8, 0);

/**
 * @generated from message perfetto.protos.V8RegExpCode
 */
export type V8RegExpCode = Message<"perfetto.protos.V8RegExpCode"> & {
  /**
   * @generated from field: optional uint64 v8_isolate_iid = 1;
   */
  v8IsolateIid: bigint;

  /**
   * @generated from field: optional uint32 tid = 2;
   */
  tid: number;

  /**
   * @generated from field: optional perfetto.protos.V8String pattern = 3;
   */
  pattern?: V8String;

  /**
   * @generated from field: optional uint64 instruction_start = 4;
   */
  instructionStart: bigint;

  /**
   * @generated from field: optional uint64 instruction_size_bytes = 5;
   */
  instructionSizeBytes: bigint;

  /**
   * @generated from field: optional bytes machine_code = 6;
   */
  machineCode: Uint8Array;
};

/**
 * Describes the message perfetto.protos.V8RegExpCode.
 * Use `create(V8RegExpCodeSchema)` to create a new message.
 */
export const V8RegExpCodeSchema: GenMessage<V8RegExpCode> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 9);

/**
 * Move event for V8 code (JS / Wasm / Internal / Regexp) that was relocated in
 * memory by V8's GC.
 *
 * @generated from message perfetto.protos.V8CodeMove
 */
export type V8CodeMove = Message<"perfetto.protos.V8CodeMove"> & {
  /**
   * @generated from field: optional uint64 isolate_iid = 1;
   */
  isolateIid: bigint;

  /**
   * @generated from field: optional uint32 tid = 2;
   */
  tid: number;

  /**
   * @generated from field: optional uint64 from_instruction_start_address = 3;
   */
  fromInstructionStartAddress: bigint;

  /**
   * @generated from field: optional uint64 to_instruction_start_address = 4;
   */
  toInstructionStartAddress: bigint;

  /**
   * @generated from field: optional uint64 instruction_size_bytes = 5;
   */
  instructionSizeBytes: bigint;

  /**
   * @generated from oneof perfetto.protos.V8CodeMove.to_instructions
   */
  toInstructions: {
    /**
     * @generated from field: bytes to_machine_code = 6;
     */
    value: Uint8Array;
    case: "toMachineCode";
  } | {
    /**
     * @generated from field: bytes to_bytecode = 7;
     */
    value: Uint8Array;
    case: "toBytecode";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message perfetto.protos.V8CodeMove.
 * Use `create(V8CodeMoveSchema)` to create a new message.
 */
export const V8CodeMoveSchema: GenMessage<V8CodeMove> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 10);

/**
 * @generated from message perfetto.protos.V8CodeDefaults
 */
export type V8CodeDefaults = Message<"perfetto.protos.V8CodeDefaults"> & {
  /**
   * @generated from field: optional uint32 tid = 1;
   */
  tid: number;
};

/**
 * Describes the message perfetto.protos.V8CodeDefaults.
 * Use `create(V8CodeDefaultsSchema)` to create a new message.
 */
export const V8CodeDefaultsSchema: GenMessage<V8CodeDefaults> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_chrome_v8, 11);

